Remove code for r_fakelight.
[xonotic/darkplaces.git] / shader_glsl.h
index f9be074..aef2bb9 100644 (file)
@@ -37,7 +37,7 @@
 "# endif\n",
 "#endif\n",
 "\n",
-"#if defined(GLSL120) || defined(GLSL130) || defined(GLSL140) || defined(GLES)\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",
 "#if defined(MODE_LIGHTMAP) || defined(MODE_LIGHTDIRECTIONMAP_MODELSPACE) || defined(MODE_LIGHTDIRECTIONMAP_TANGENTSPACE) || defined(MODE_LIGHTDIRECTIONMAP_FORCED_LIGHTMAP)\n",
 "# define USELIGHTMAP\n",
 "#endif\n",
-"#if defined(USESPECULAR) || defined(USEOFFSETMAPPING) || defined(USEREFLECTCUBE) || defined(MODE_FAKELIGHT) || defined(USEFOG)\n",
+"#if defined(USESPECULAR) || defined(USEOFFSETMAPPING) || defined(USEREFLECTCUBE) || defined(USEFOG)\n",
 "# define USEEYEVECTOR\n",
 "#endif\n",
 "\n",
 "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",
 "#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",
 "      #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",
 "              myhalf3 lightcolor = cast_myhalf3(VertexColor.rgb);\n",
 "   #endif\n",
 "#endif\n",
-"#ifdef MODE_FAKELIGHT\n",
-"      #define SHADING\n",
-"      myhalf3 lightnormal = cast_myhalf3(normalize(EyeVectorFogDepth.xyz));\n",
-"      myhalf3 lightcolor = cast_myhalf3(1.0);\n",
-"#endif // MODE_FAKELIGHT\n",
 "\n",
 "\n",
 "\n",