[code]local splash = Material("gmachines/splash.png")[/code]
[code]function ENT:Draw()
render.MaterialOverrideByIndex(1, splash)
self.BaseClass.Draw(self)
end[/code]
[img]http://i.imgur.com/3pS9y50.png[/img]
What am I doing wrong?
What you are doing wrong is not using vertexlitgeneric shader, which is required for models.
[editline]12th October 2014[/editline]
PNGs default to unlitgeneric.
That didn't work either.
[editline]12th October 2014[/editline]
On a related note, how can I precache materials?
What didn't work? You'll have to make a new material using CreateMaterial() for this as far as I can tell.
Try this
local splash = Material("gmachines/splash.png","vertextlitgeneric alphatest")
He can't use the PNG parameters in the Material function to make this possible?
[B]EDIT:
[/B]Ninja'd
[QUOTE=LUModder;46216023]Try this
local splash = Material("gmachines/splash.png","vertextlitgeneric alphatest")[/QUOTE]
Nope, still invisible.
Sorry, you need to Log In to post a reply to this thread.