At the bottom of shaders/common/torque.hlsl:
/// Called from the visibility feature to do screen /// door transparency for fading of objects. void fizzle(float2 vpos, float visibility) { // NOTE: The magic values below are what give us // the nice even pattern during the fizzle. // // These values can be changed to get different // patterns... some better than others. // // Horizontal Blinds - { vpos.x, 0.916, vpos.y, 0 } // Vertical Lines - { vpos.x, 12.9898, vpos.y, 78.233 } // // I'm sure there are many more patterns here to // discover for different effects. //yorks old fizzle out //float2x2 m = { vpos.x, 0.916, vpos.y, 0.350 }; //clip( visibility - frac( determinant( m ) ) ); //yorks new fizzle in float2x2 m = { vpos.x, 0.916, vpos.y, 0.350 }; float2x2 n = { vpos.x, 0.350, vpos.y, 0.916 }; clip( visibility - frac( determinant( m ) ) ); clip( visibility - frac( determinant( n ) ) ); } #endif // _TORQUE_HLSL_All this does is make it fizzle on both x and y planes equally. And remember, translucent materials do proper alpha fading without this fizzle effect.
Fizzle on dudes!
