"#endif\n"
"#else // !MODE_SHOWDEPTH\n"
"#ifdef MODE_POSTPROCESS\n"
+"varying vec2 TexCoord1;\n"
+"varying vec2 TexCoord2;\n"
+"\n"
"#ifdef VERTEX_SHADER\n"
"void main(void)\n"
"{\n"
" gl_Position = ftransform();\n"
-" gl_TexCoord[0] = gl_MultiTexCoord0;\n"
+" TexCoord1 = gl_MultiTexCoord0.xy;\n"
"#ifdef USEBLOOM\n"
-" gl_TexCoord[1] = gl_MultiTexCoord1;\n"
+" TexCoord2 = gl_MultiTexCoord1.xy;\n"
"#endif\n"
"}\n"
"#endif\n"
"uniform vec2 PixelSize;\n"
"void main(void)\n"
"{\n"
-" gl_FragColor = texture2D(Texture_First, gl_TexCoord[0].xy);\n"
+" gl_FragColor = texture2D(Texture_First, TexCoord1);\n"
"#ifdef USEBLOOM\n"
-" gl_FragColor += texture2D(Texture_Second, gl_TexCoord[1].xy);\n"
+" gl_FragColor += texture2D(Texture_Second, TexCoord2);\n"
"#endif\n"
"#ifdef USEVIEWTINT\n"
" gl_FragColor = mix(gl_FragColor, ViewTintColor, ViewTintColor.a);\n"
"#ifdef USEPOSTPROCESSING\n"
"// do r_glsl_dumpshader, edit glsl/default.glsl, and replace this by your own postprocessing if you want\n"
"// this code does a blur with the radius specified in the first component of r_glsl_postprocess_uservec1 and blends it using the second component\n"
-" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.987688, -0.156434)) * UserVec1.y;\n"
-" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.156434, -0.891007)) * UserVec1.y;\n"
-" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.891007, -0.453990)) * UserVec1.y;\n"
-" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2( 0.707107, 0.707107)) * UserVec1.y;\n"
-" gl_FragColor += texture2D(Texture_First, gl_TexCoord[0].xy + PixelSize*UserVec1.x*vec2(-0.453990, 0.891007)) * UserVec1.y;\n"
+" gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2(-0.987688, -0.156434)) * UserVec1.y;\n"
+" gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2(-0.156434, -0.891007)) * UserVec1.y;\n"
+" gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2( 0.891007, -0.453990)) * UserVec1.y;\n"
+" gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2( 0.707107, 0.707107)) * UserVec1.y;\n"
+" gl_FragColor += texture2D(Texture_First, TexCoord1 + PixelSize*UserVec1.x*vec2(-0.453990, 0.891007)) * UserVec1.y;\n"
" gl_FragColor /= (1 + 5 * UserVec1.y);\n"
"#endif\n"
"\n"
"#endif\n"
"#else // !MODE_POSTPROCESS\n"
"#ifdef MODE_GENERIC\n"
+"#ifdef USEDIFFUSE\n"
+"varying vec2 TexCoord1;\n"
+"#endif\n"
+"#ifdef USESPECULAR\n"
+"varying vec2 TexCoord2;\n"
+"#endif\n"
"#ifdef VERTEX_SHADER\n"
"void main(void)\n"
"{\n"
" gl_FrontColor = gl_Color;\n"
"#ifdef USEDIFFUSE\n"
-" gl_TexCoord[0] = gl_MultiTexCoord0;\n"
+" TexCoord1 = gl_MultiTexCoord0.xy;\n"
"#endif\n"
"#ifdef USESPECULAR\n"
-" gl_TexCoord[1] = gl_MultiTexCoord1;\n"
+" TexCoord2 = gl_MultiTexCoord1.xy;\n"
"#endif\n"
" gl_Position = ftransform();\n"
"}\n"
"{\n"
" gl_FragColor = gl_Color;\n"
"#ifdef USEDIFFUSE\n"
-" gl_FragColor *= texture2D(Texture_First, gl_TexCoord[0].xy);\n"
+" gl_FragColor *= texture2D(Texture_First, TexCoord1);\n"
"#endif\n"
"\n"
"#ifdef USESPECULAR\n"
-" vec4 tex2 = texture2D(Texture_Second, gl_TexCoord[1].xy);\n"
+" vec4 tex2 = texture2D(Texture_Second, TexCoord2);\n"
"#endif\n"
"#ifdef USECOLORMAPPING\n"
" gl_FragColor *= tex2;\n"
"#endif\n"
"#else // !MODE_GENERIC\n"
"#ifdef MODE_BLOOMBLUR\n"
+"varying TexCoord;\n"
"#ifdef VERTEX_SHADER\n"
"void main(void)\n"
"{\n"
" gl_FrontColor = gl_Color;\n"
-" gl_TexCoord[0] = gl_MultiTexCoord0;\n"
+" TexCoord = gl_MultiTexCoord0.xy;\n"
" gl_Position = ftransform();\n"
"}\n"
"#endif\n"
"void main(void)\n"
"{\n"
" int i;\n"
-" vec2 tc = gl_TexCoord[0].xy;\n"
+" vec2 tc = TexCoord;\n"
" vec3 color = texture2D(Texture_First, tc).rgb;\n"
" tc += BloomBlur_Parameters.xy;\n"
" for (i = 1;i < SAMPLES;i++)\n"