summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-22 21:33:10 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-22 21:33:10 +0100
commit31f8565e35b1759a6f0d82141ca2538a40fc39c4 (patch)
tree73b72f190a3587aa46691e6676e57e4ab8b74c90 /indra/newview
parent66fa6d41974c8a46463d5607b6502c7b4c130a5e (diff)
ssreflections: dampen/blur ssreflections rather more.
(transplanted from 4c4ae8d8f0795244fda258c157177e2778bfc444)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl4
3 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
index 01d18cdcde..bf5dd4155c 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl
@@ -299,7 +299,7 @@ void main()
// The goal of the blur is to soften reflections in surfaces
// with low shinyness, and also to disguise our lameness.
float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
- float checkoffset = 1.0 + (7.0*(1.0-spec.a))*(checkerboard-0.5);
+ float checkoffset = (3.0 + (7.0*(1.0-spec.a)))*(checkerboard-0.5);
ref2d += vec2(checkoffset, checkoffset);
ref2d += tc.xy; // use as offset from destination
// Get attributes from the 2D guess point.
@@ -324,6 +324,7 @@ void main()
float refmod = min(refapprop, reflit);
vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
vec3 ssshiny = (refprod * spec.a);
+ ssshiny *= 0.3; // dampen it even more
// add the two types of shiny together
col += (ssshiny + dumbshiny) * spec.rgb;
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 2982cd3e09..28cfc6322e 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -298,7 +298,7 @@ void main()
// The goal of the blur is to soften reflections in surfaces
// with low shinyness, and also to disguise our lameness.
float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
- float checkoffset = 1.0 + (7.0*(1.0-spec.a))*(checkerboard-0.5);
+ float checkoffset = (3.0 + (7.0*(1.0-spec.a)))*(checkerboard-0.5);
ref2d += vec2(checkoffset, checkoffset);
ref2d += tc.xy; // use as offset from destination
// Get attributes from the 2D guess point.
@@ -324,6 +324,7 @@ void main()
float refmod = min(refapprop, reflit);
vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
vec3 ssshiny = (refprod * spec.a);
+ ssshiny *= 0.3; // dampen it even more
// add the two types of shiny together
col += (ssshiny + dumbshiny) * spec.rgb;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index e1e035411b..9f94b9e8ea 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -301,7 +301,8 @@ void main()
// The goal of the blur is to soften reflections in surfaces
// with low shinyness, and also to disguise our lameness.
float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
- float checkoffset = 1.0 + (7.0*(1.0-spec.a))*(checkerboard-0.5);
+ float checkoffset = (3.0 + (7.0*(1.0-spec.a)))*(checkerboard-0.5);
+
ref2d += vec2(checkoffset, checkoffset);
ref2d += tc.xy; // use as offset from destination
// Get attributes from the 2D guess point.
@@ -327,6 +328,7 @@ void main()
float refmod = min(refapprop, reflit);
vec3 refprod = vary_SunlitColor * refcol.rgb * refmod;
vec3 ssshiny = (refprod * spec.a);
+ ssshiny *= 0.3; // dampen it even more
// add the two types of shiny together
col += (ssshiny + dumbshiny) * spec.rgb;