summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorPtolemy <ptolemy@lindenlab.com>2020-02-25 11:34:23 -0800
committerPtolemy <ptolemy@lindenlab.com>2020-02-25 13:25:15 -0800
commit22ec67975ccf7dd6da3dbddf94f503b14abee68e (patch)
tree3f757a79ad644a4efeb49dffd7e349cd873331aa /indra/newview/app_settings/shaders/class2/deferred
parent9d9b8901e4cb8f3e3d5eaf5beb76de6b00ec75e3 (diff)
SL-12574: Simplify Direct Ambient
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl8
1 files changed, 2 insertions, 6 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index f49fad5517..593706867d 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -85,11 +85,7 @@ void main()
float scol = 1.0;
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);
-
- float final_da = da;
- final_da = clamp(final_da, 0.0, 1.0);
+ float da = clamp(dot(normalize(norm.xyz), light_dir.xyz), 0.0, 1.0);
vec4 diffuse_srgb = texture2DRect(diffuseRect, tc);
vec4 diffuse_linear = vec4(srgb_to_linear(diffuse_srgb.rgb), diffuse_srgb.a);
@@ -116,7 +112,7 @@ void main()
ambient *= ambient;
ambient = (1.0 - ambient);
- vec3 sun_contrib = min(scol, final_da) * sunlit;
+ vec3 sun_contrib = min(scol, da) * sunlit;
#if !defined(AMBIENT_KILL)
color.rgb = amblit;