#ifdef GL_ES precision mediump int; precision highp float; #endif #define USE_OGRE_FROM_FUTURE #include OGRE_UNIFORMS( uniform vec4 materialColor; uniform vec4 slicePlane; ) MAIN_PARAMETERS IN(vec4 oUv0, TEXCOORD0) IN(vec4 oWp, TEXCOORD1) MAIN_DECLARATION { if(((slicePlane.x + slicePlane.y + slicePlane.z) != 0.0) && (slicePlane.x * oWp.x + slicePlane.y * oWp.y + slicePlane.z * oWp.z + slicePlane.w > 0.0)) discard; float finalDepth = oUv0.z / oUv0.w; gl_FragColor = vec4(finalDepth, materialColor.a, finalDepth, finalDepth); }