Two-sided & Translucent Effect

This is a effective technique to render the two-sided polygons with a translucent effect, like you would see with light shining behind leaves or a lampshade. It's useful for foliage, banners, cloth, etc.

The shader files can be found at the "effects\twosided" folder.

Textures setting of two-sided shaders:
0: decal map (can have alpha data)


Factors of two-sided shaders
:

dword dwAlphaRef;                        //the reference alpha value for Alpha Testing.


Usage:

material.setEffectDword('dwAlphaRef',
dwRef )

Example:

(dside = material)
dside.setEffectDword( 'dwAlphaRef', toDWORD('18') );