"#endif\n",
"\n",
"#ifdef MODE_DEPTH_OR_SHADOW\n",
-"dp_varying highp float Depth;\n",
"#ifdef VERTEX_SHADER\n",
"void main(void)\n",
"{\n",
"#ifdef USETRIPPY\n",
" gl_Position = TrippyVertex(gl_Position);\n",
"#endif\n",
-" Depth = gl_Position.z;\n",
"}\n",
"#endif\n",
"\n",
"void main(void)\n",
"{\n",
"#ifdef USEDEPTHRGB\n",
-" dp_FragColor = encodedepthmacro(Depth);\n",
+" dp_FragColor = encodedepthmacro(gl_FragCoord.z);\n",
"#else\n",
" dp_FragColor = vec4(1.0,1.0,1.0,1.0);\n",
"#endif\n",