]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - shader_glsl.h
Reduce amount of attributes for depth pass
[xonotic/darkplaces.git] / shader_glsl.h
index 5a4b224a2e88b31b1363444828ed5c824cb78317..c729bc6fc8fe0e435930d99f4e763ad8d22a4aa5 100644 (file)
 "#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",