]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - shader_glsl.h
Use the invariant keyword on gl_Position on GLSL 1.20 or higher and GLSL ES
[xonotic/darkplaces.git] / shader_glsl.h
index 90d5d770db2fe73fc52326f6e4dcb1479dc51a28..f9be074eff2c1031bcaa8483187d5b58171c45cf 100644 (file)
@@ -37,6 +37,9 @@
 "# endif\n",
 "#endif\n",
 "\n",
+"#if defined(GLSL120) || defined(GLSL130) || defined(GLSL140) || defined(GLES)\n"
+"invariant gl_Position; // fix for lighting polygons not matching base surface\n",
+"# endif\n",
 "#if defined(GLSL130) || defined(GLSL140)\n",
 "precision highp float;\n",
 "# ifdef VERTEX_SHADER\n",