Texture fucked up

I’m using **[Draw.TexturedQuad

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Draw.TexturedQuad)** to draw a texture on HUD, and its black. I switched the texture to some silkicon, and it works. I guess, I don’t know options for converting image to texture. Any hints? I’m using VTFEdit.

Post the contents of the vmt.

I’m guessing your vmt looks something like this:


VertexLit textures are ones meant for brushwork and models if I recall, and respond to the lighting on the map relative to, I think, where the player’s eye position is.

Change it to “UnlitGeneric” which isn’t meant for 3D rendering, and does not get lit by the engine. This is what you ( in almost all cases ) for HUDs or vgui.

Well, no.

	"$basetexture" "gui/padlock"
	"$bumpmap" "gui/padlock_normal"
	"$surfaceprop" "Default"
	"$translucent" 1

According to Valve’s Wiki, $bumpmap and $surfaceprop aren’t supported although that could be wrong.

$bumpmap is not supported on UnlitGeneric, becuse it doesnt have any lighting

Doesn’t help.
New vmt:

	"$basetexture" "gui/padlock"
	"$translucent" 1

The same black shit.

“$vertexalpha” 1
“$vertexcolor” 1

Probably won’t affect your drawing, but is worth having in the vmt.

Could you post the code you are using to draw the quad with?

				local PadLockTable = {} 
				PadLockTable.texture 	= surface.GetTextureID( "gui/padlock" )
				PadLockTable.color		= Color( 0, 0, 0, 255 ) 		
				PadLockTable.x = ScrW()/2-32
				PadLockTable.y = ScrH()/2-32
				PadLockTable.w = 64
				PadLockTable.h = 64
				draw.TexturedQuad( PadLockTable )

Should be Color(255,255,255,255) 0,0,0 is black:v:

It just made the quad to be white instead of black.

surface.GetTextureID( “gui/padlock” )

Reference that outside of the draw hook.

Didn’t helped.

Anyone? Maybe someone can convert it for me? Links:

Well there’s your problem, it has to be in vtf format.

:colbert: Those are his source files.


Put them in materials/gui. I also included what SHOULD be working vmts, so no need to edit them.

Oops. Nvm then:v:

Thanks, it worked.