]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - shader_hlsl.h
Refactored R_UpdateEntityLighting to CL_UpdateEntityShading, which sets fields like...
[xonotic/darkplaces.git] / shader_hlsl.h
index 9b3f04c3faa71d9e5e0a4a3192c7d5e04904144c..57df52d06b330b06a2fbb0822a919000258298a8 100644 (file)
 "uniform sampler Texture_ReflectMask : register(s5),\n",
 "uniform samplerCUBE Texture_ReflectCube : register(s6),\n",
 "#endif\n",
-"#ifdef MODE_LIGHTDIRECTION\n",
-"uniform half3 LightColor : register(c21),\n",
-"#endif\n",
-"#ifdef MODE_LIGHTSOURCE\n",
-"uniform half3 LightColor : register(c21),\n",
-"#endif\n",
 "\n",
 "#if defined(MODE_LIGHTSOURCE) || defined(MODE_DEFERREDLIGHTSOURCE)\n",
 "uniform sampler Texture_Attenuation : register(s9),\n",
 "#else\n",
 "      color.rgb = diffusetex * Color_Ambient;\n",
 "#endif\n",
-"      color.rgb *= LightColor;\n",
 "      color.rgb *= half(tex2D(Texture_Attenuation, float2(length(CubeVector), 0.0)).r);\n",
 "#if defined(USESHADOWMAP2D)\n",
 "      color.rgb *= half(ShadowMapCompare(CubeVector, Texture_ShadowMap2D, ShadowMap_Parameters, ShadowMap_TextureScale\n",
 "      #ifdef USEDIFFUSE\n",
 "              half3 lightnormal = half3(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",
 "#ifdef MODE_FAKELIGHT\n",
 "      #define SHADING\n",
 "      half3 lightnormal = half3(normalize(EyeVector));\n",
-"      half3 lightcolor = half3(1.0,1.0,1.0);\n",
+"      #define lightcolor 1\n",
 "#endif // MODE_FAKELIGHT\n",
 "\n",
 "\n",