summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2018-11-12 15:54:53 -0800
committerGraham Linden <graham@lindenlab.com>2018-11-12 15:54:53 -0800
commita49e2b604e6b505e083e24b10e39053196d917c1 (patch)
tree931c403bcc66f9831b595b1aeb54534e5a5eff4a /indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
parentbdf4442e216273bb32eeb607857efdad2336ee81 (diff)
SL-10044 SL-10045
Fix class 1 and 2 transport/gamma funcs and made usage consistent across all shaders. Fix class1\environment\waterV reverting to old d1/d2 names for wave directions.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl')
-rw-r--r--indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
index eef259349f..3acf9fe883 100644
--- a/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
+++ b/indra/newview/app_settings/shaders/class2/lighting/sumLightsSpecularV.glsl
@@ -31,6 +31,7 @@ vec3 calcPointLightSpecular(inout vec4 specular, vec3 view, vec3 v, 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_attenuation[8];
@@ -49,6 +50,7 @@ vec4 sumLightsSpecular(vec3 pos, vec3 norm, vec4 color, inout vec4 specularColor
col.rgb += light_diffuse[1].rgb * calcDirectionalLightSpecular(specularColor, view, norm, light_position[1].xyz,light_diffuse[1].rgb, 1.0);
col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[2].xyz, light_attenuation[2].x, light_attenuation[2].y, light_diffuse[2].rgb);
col.rgb += calcPointLightSpecular(specularSum, view, pos, norm, light_position[3].xyz, light_attenuation[3].x, light_attenuation[3].y, light_diffuse[3].rgb);
+ col.rgb = scaleDownLight(col.rgb);
// Add windlight lights
col.rgb += atmosAmbient(baseCol.rgb);