#define MASK float4(1, 0, 0 ,0) #include "Vol_DepthRender_tex.cgfx" technique basic < string layer = "Volume" ; > { pass p0 { VertexProgram = compile vp30 backFaceVP(); FragmentProgram = compile fp40 backFaceFP(); // Render back faces only, testing against scene depth, not writing into the depthmap CullFaceEnable = true; CullFace = Front ; DepthTestEnable = false; DepthMask = false; // Additively blend the depths BlendEnable = true; BlendFunc = int2( One , One ) ; } pass p1 { VertexProgram = compile vp30 frontFaceVP(); FragmentProgram = compile fp40 frontFaceFP(); // Render back faces only, testing against scene depth, not writing into the depthmap CullFaceEnable = true; CullFace = Back ; DepthTestEnable = false; DepthMask = false; // Subtractively blend the depths BlendEnable = true; BlendFunc = int2( One , One ) ; } }