DrawTexturedRectUV Issues.

I have been trying to get the DrawTexturedRectUV to work properly, eg. rendering, but I cannot for the life of me figure it out.

Code Snippet:

local bg1 = Material("bigmenu/bg1.png","noclamp")

surface.DrawTexturedRectUV( 62, 0, 1000, 80, 0, 0, 1000/3, 80/3 )

Comes out this this ugliness.


I am using a simple 3x3px pattern, but it isn’t rendering properly.

PNGs MUST be power of 2 ( for Source ), so each side MUST be on of these: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, etc.

In your case, when a 3x3 png is loaded, it is being coverted into a 4x4 and the texture quality just fuckups.

You save the day once again Robotboy, keep up the solid support on FP.