Game Development Community

Textures with alpha channel

by Harvey Greensall · in Torque Game Engine Advanced · 02/16/2007 (7:34 am) · 3 replies

Hi Guys, I've got our game in TGEA, created a material.cs to get all the textures showing ( they were orange) but the ones with alpha channels in the .png are drawing solid....Any idea how to get round this? I assume I have to add something to the texture in the material.cs ??

Cheers in Advance

H.

#1
02/16/2007 (8:12 am)
You actually need to enable translucency and set the blend function, its not enabled by default (as it works different than in TGE)

See the material part on the TDN for the details on "how to do it"
#2
02/16/2007 (8:18 am)
We had the same problem. Adding these lines to the Material worked for us:
translucent = true;
translucentBlendOp = None;
If that doesn't work properly, try different BlendOp's.
#3
02/16/2007 (8:30 am)
Yeah, that's got it! Cheers guys.. 8)