I am using a texture as a 'player marker', and I would like to able to adjust the color of the texture, meaning I do not need a seperate texture per color. I have tried using render.SetMaterial along with render.DrawQuadEasy (passing it the Color parameter), but I always get the same material, even when changing the color passed to DrawQuadEasy. Is there a simple way to allow the changing of a material's color using LUA, or do I need a different texture per color?
The .vmt must have $vertexcolor 1 for colors to work.
[QUOTE=Robotboy655;43010569]The .vmt must have $vertexcolor 1 for colors to work.[/QUOTE]
Thanks, I'll try it out and report back after :D
[img_thumb]http://i.imgur.com/mpqrK0c.png[/img_thumb]
It seems that even after adding the tag "$vertexcolor 1" to my file, the texture still doesn't change color. Here is my vmt file;
[code]"UnlitGeneric"
{
"$basetexture" "circle"
"$translucent" 1
"$vertectcolor" 1
"$nolod" 1
}[/code]
The lua code used to render the shape is as follows;
[code]render.DrawQuadEasy( tr.HitPos + tr.HitNormal, tr.HitNormal, radius, radius, Color(255, 0, 0, 0));[/code]
My texture is simply a grey circle as shown in the screenshot.