From: uis Date: Wed, 3 Jan 2024 15:56:28 +0000 (+0300) Subject: Reduce amount of attributes for depth pass X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a7e3676dd7fef874433785e95b4077b24e555840;p=xonotic%2Fdarkplaces.git Reduce amount of attributes for depth pass Use fragment depth from built-in gl_FragCoord instead of our own depth attribute --- diff --git a/shader_glsl.h b/shader_glsl.h index 5a4b224a..c729bc6f 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -173,7 +173,6 @@ "#endif\n", "\n", "#ifdef MODE_DEPTH_OR_SHADOW\n", -"dp_varying highp float Depth;\n", "#ifdef VERTEX_SHADER\n", "void main(void)\n", "{\n", @@ -193,7 +192,6 @@ "#ifdef USETRIPPY\n", " gl_Position = TrippyVertex(gl_Position);\n", "#endif\n", -" Depth = gl_Position.z;\n", "}\n", "#endif\n", "\n", @@ -201,7 +199,7 @@ "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",