-" vec2 back_coord = gl_FragCoord.xy*uInverseRatioMain.xy*uInverseRatioDepth.xy;\n"
-" float back_depth = texture( uTexSceneDepth, back_coord ).r;\n"
-" float front_depth = gl_FragCoord.z/gl_FragCoord.w;\n"
+" if( uDepthCompare ){\n"
+" vec2 back_coord = gl_FragCoord.xy * uInverseRatioMain.xy \n"
+" * uInverseRatioDepth.xy;\n"
+" float back_depth = texture( uTexSceneDepth, back_coord ).r;\n"
+" float front_depth = gl_FragCoord.z/gl_FragCoord.w;\n"