summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-02 16:09:31 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-02 16:09:31 +0100
commit286572ec90558015bfec8a7f738502b63465be3e (patch)
tree4e0ac530e28965e051cb8e2b72cd52df812c2d70
parentac2db4d1db16a425231ee7788c172da3b8700eaf (diff)
ssreflection: restore the shadow factor I accidentally removed with the last update.
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl2
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl2
2 files changed, 2 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 d6fbae7b22..00a6a9dcb5 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -315,7 +315,7 @@ void main()
// reflect light direction to increase the illusion that
// these are reflections.
vec3 reflight = reflect(lightnorm.xyz, norm.xyz);
- float reflit = max(dot(refn, reflight.xyz), 0.0);
+ float reflit = min(max(dot(refn, reflight.xyz), 0.0), refshad);
// apply sun color to guess-point, dampen according to inappropriateness of guess
float refmod = min(refapprop, reflit);
vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index ecfd9bef52..aaa74eb7df 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -318,7 +318,7 @@ void main()
// reflect light direction to increase the illusion that
// these are reflections.
vec3 reflight = reflect(lightnorm.xyz, norm.xyz);
- float reflit = max(dot(refn, reflight.xyz), 0.0);
+ float reflit = min(max(dot(refn, reflight.xyz), 0.0), refshad);
// apply sun color to guess-point, dampen according to inappropriateness of guess
float refmod = min(refapprop, reflit);
vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;