Model is pixelated

Iconz = vgui.Create("SpawnIcon", frame)
	Iconz:SetPos(ScrW() / 2 - 900, ScrH() / 2 - 500)
	Iconz:SetSize(200, 200)

Does anyone know how to make it so its not pixelated or is that no possible? Thanks in advance.

Call Iconz:InvalidateLayout(true) after setting the model

Sorry for the late reply but it didn’t work.

The size should be a a power of 2.

I tried 256x256 still pixelated!

It’s pixelated because you draw a 64x64 image over a 256x256 size.

You must rerender the icon to 256x256.

icon:InvalidateLayout( true ) must be called after SetSize and BEFORE SetModel.
[del]Try calling SpawnIcon:RebuildSpawnIcon()[/del]

Thank you based Robotboy and Chessnut!