summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
index b42506dd40..c9987ef3b9 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsV.glsl
@@ -28,6 +28,7 @@ float calcPointLightOrSpotLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, floa
vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 scaleDownLight(vec3 light);
uniform vec4 light_position[8];
uniform vec3 light_direction[8];
@@ -44,6 +45,8 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
col.rgb += light_diffuse[2].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
col.rgb += light_diffuse[3].rgb*calcPointLightOrSpotLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
+ col.rgb = scaleDownLight(col.rgb);
+
// Add windlight lights
col.rgb += atmosAmbient(baseLight.rgb);
col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));