summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/app_settings/shaders/class2')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 92888e0fd2..688e4e1d59 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -99,6 +99,7 @@ void main()
vec2 scol_ambocc = texture2DRect(lightMap, vary_fragcoord.xy).rg;
float da = dot(normalize(norm.xyz), light_dir.xyz);
+ da = clamp(da, -1.0, 1.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
@@ -122,13 +123,13 @@ void main()
calcFragAtmospherics(pos.xyz, ambocc, sunlit, amblit, additive, atten);
- float ambient = abs(da);
+ float ambient = da;
ambient *= 0.5;
ambient *= ambient;
ambient = max(0.9, ambient);
ambient = 1.0 - ambient;
- vec3 sun_contrib = min(scol, final_da) * sunlit;
+ vec3 sun_contrib = mix(final_da, min(scol, final_da), 0.1) * sunlit;
col.rgb = amblit;
col.rgb *= ambient;