summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-02 14:50:24 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-02 14:50:24 +0100
commitcae24385d7a119d0ad634d252bd3bb1e4e68c57c (patch)
treec8497d51b02893193d4ea3d9279924dc13abb038
parent89ad33a53ef239adf332532fa1039ae6313f5ba9 (diff)
ssreflections: use the minimum of the lighting dp and the appropriateness. not the product.
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl2
1 files changed, 2 insertions, 0 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 51d737f10b..8b2b983ba4 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -317,6 +317,8 @@ void main()
float reflit = max(dot(refn, reflight.xyz), 0.0);
// apply sun color to guess-point, dampen according to inappropriateness of guess
vec3 refprod = (vary_SunlitColor*reflit) * refcol.rgb * refapprop;
+ float refmod = min(refapprop, reflit);
+ vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
vec3 ssshiny = (refprod * spec.a);
// add the two types of shiny together