Hi! I’m looking to draw some textures (extensions .vmt and .vtf to clarify precisely what I mean) and have have their colors dimmed, so the texture looks grey-scaled. I’m using surface.SetTexture, with the texture’s ID as its one argument, in a button’s Paint() function. My code currently looks like the following:
but.Paint = function() surface.SetDrawColor(255, 255, 255) surface.SetTexture(TextureIDHere) surface.DrawTexturedRect(1, 1, buttonWidth - 1, buttonHeight - 1) return true end
I have edited most vars’ names so you understand what my intentions with them are.
From my understanding, and this has worked well for me in the past with Materials (so .png’s and .jpg’s), editing the RGB values in surface.SetDrawColor changes what RGB is used when drawing the Material (but in my case I want to draw a texture). If I want the Material’s colors to be dull, I can set the RGB values to half of what I otherwise want them to be (in most cases, 255 for all 3) and, as most people reading this know, the picture will look a lot more grey/black/dull.
Out of the 8 *textures *I’ve tried “editing” with surface.SetDrawColor, only 1 of them has seen any effect. Only 1 of the textures would change its colors when I edited surface.SetDrawColor, the other 7 remained the exact same color. This brings me to a screeching halt because I don’t quite know where to proceed next.
Utilizing the Gmod wiki, I know Materials can be changed far more drastically using Post-Processing Materials, but the page is about Materials and not Textures.
So… what do? Can I still utilize the same post-processing materials for textures? And if so, what does it look like? Thanks for any help.