disable backface culling for custommaterials
by Dan Keller · in Torque 3D Professional · 10/22/2011 (7:44 pm) · 3 replies
How can I turn off backface culling for custommaterials? I tried creating a state block:
singleton GFXStateBlockData( LeafSBData )
{
cullDefined = true;
cullMode = GFXCullNone;
};and referring to it in the material definition, but it doesn't make any difference.About the author
Recent Threads
#3
10/23/2011 (10:02 am)
I did that and it didn't work. Turns out the problem was the pixel shader multiplying the alpha by the dot product of the view vector and world normal. Silly me, dot is negative for antiparallel vectors...
Torque Owner Ivan Mandzhukov
Liman3D
This should set the stateblock on the fly.