Is there any way to make a shader that double sides polygons work with transparency? If I try it on the shaders I have now it looks aweful because you can see the inside polygons.

I tried this work around, since the parts that are double sided are not in view when the camera is up close. When the camera is close I turn the material off and transparency on, just while the camera is in close range:

Code:

if(actual_dist_from_player > 0 && actual_dist_from_player < 100)
{
my.material = null;
my.transparent = on;
my.transparent = actual_dist_from_player;
}else
{ if (my.material==null)
{
my.transparent=off;
my.material = mtl_doublesided;
}

}



However this causes the engine to crash (not just an error, the whole window folds).

EDIT> That should have been my.alpha = actual_dist_from_player, but anyway, it is setting the material to null that causes the crash.





Last edited by A.Russell; 04/03/04 13:27.