X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=shader_glsl.h;h=36542c53810ab34c673013cdc3d583e3ce4a7d7d;hb=b1a556f0b1e9d339a0128631354eae88fb8f0fb2;hp=90d5d770db2fe73fc52326f6e4dcb1479dc51a28;hpb=d936abc44e2965d49f8f2e3d5030c5ad3a5bf222;p=xonotic%2Fdarkplaces.git diff --git a/shader_glsl.h b/shader_glsl.h index 90d5d770..36542c53 100644 --- a/shader_glsl.h +++ b/shader_glsl.h @@ -37,6 +37,9 @@ "# endif\n", "#endif\n", "\n", +"#if (defined(GLSL120) || defined(GLSL130) || defined(GLSL140) || defined(GLES)) && defined(VERTEX_SHADER)\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", @@ -1418,12 +1421,6 @@ "uniform sampler2D Texture_ReflectMask;\n", "uniform samplerCube Texture_ReflectCube;\n", "#endif\n", -"#ifdef MODE_LIGHTDIRECTION\n", -"uniform myhalf3 LightColor;\n", -"#endif\n", -"#ifdef MODE_LIGHTSOURCE\n", -"uniform myhalf3 LightColor;\n", -"#endif\n", "#ifdef USEBOUNCEGRID\n", "uniform sampler3D Texture_BounceGrid;\n", "uniform float BounceGridIntensity;\n", @@ -1525,7 +1522,6 @@ "#else\n", " color.rgb = diffusetex * Color_Ambient;\n", "#endif\n", -" color.rgb *= LightColor;\n", " color.rgb *= cast_myhalf(dp_texture2D(Texture_Attenuation, vec2(length(CubeVector), 0.0)));\n", "#if defined(USESHADOWMAP2D)\n", " color.rgb *= ShadowMapCompare(CubeVector);\n", @@ -1543,7 +1539,7 @@ " #ifdef USEDIFFUSE\n", " myhalf3 lightnormal = cast_myhalf3(normalize(LightVector));\n", " #endif\n", -" #define lightcolor LightColor\n", +" #define lightcolor 1\n", "#endif // MODE_LIGHTDIRECTION\n", "#ifdef MODE_LIGHTDIRECTIONMAP_MODELSPACE\n", " #define SHADING\n", @@ -1586,7 +1582,7 @@ "#ifdef MODE_FAKELIGHT\n", " #define SHADING\n", " myhalf3 lightnormal = cast_myhalf3(normalize(EyeVectorFogDepth.xyz));\n", -" myhalf3 lightcolor = cast_myhalf3(1.0);\n", +" #define lightcolor 1\n", "#endif // MODE_FAKELIGHT\n", "\n", "\n",