summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class1/lighting
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class1/lighting')
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl2
2 files changed, 4 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
index 10958025ac..7059ff31ae 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsSpecularV.glsl
@@ -29,6 +29,7 @@ float calcDirectionalLightSpecular(inout vec4 specular, vec3 view, vec3 n, vec3
vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
vec3 atmosGetDiffuseSunlightColor();
+vec3 scaleDownLight(vec3 light);
uniform vec4 light_position[8];
uniform vec3 light_diffuse[8];
@@ -43,6 +44,7 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor
vec4 specularSum = vec4(0.0);
col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0);
+ col.rgb = scaleDownLight(col.rgb);
col.rgb += atmosAmbient(baseCol.rgb);
col.rgb += atmosAffectDirectionalLight(calcDirectionalLightSpecular(specularSum, view, norm, light_position[0].xyz,atmosGetDiffuseSunlightColor()*baseCol.a, 1.0));
diff --git a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
index 569b629ef8..41288c21c1 100644
--- a/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
+++ b/indra/newview/app_settings/shaders/class1/lighting/sumLightsV.glsl
@@ -30,6 +30,7 @@ float calcDirectionalLight(vec3 n, vec3 l);
vec3 atmosAmbient(vec3 light);
vec3 atmosAffectDirectionalLight(float lightIntensity);
+vec3 scaleDownLight(vec3 light);
vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
{
@@ -37,6 +38,7 @@ vec4 sumLights(vec3 pos, vec3 norm, vec4 color, vec4 baseLight)
col.a = color.a;
col.rgb = light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);
+ col.rgb = scaleDownLight(col.rgb);
col.rgb += atmosAmbient(baseLight.rgb);
col.rgb += atmosAffectDirectionalLight(calcDirectionalLight(norm, light_position[0].xyz));