summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-31 18:27:50 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-31 18:27:50 +0100
commit8294a543625e24ffa239e0d838b4f5a86e527efe (patch)
treed9f020463395bbf77cb4cd65398575172444a476
parente148323498c70daae4d277c916d9f1138c447eef (diff)
debug ssreflection blur direction. minor.
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl3
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl3
2 files changed, 4 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 5769288a36..922a07c306 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -289,7 +289,7 @@ void main()
//
depth -= 0.5; // unbias depth
// first figure out where we'll make our 2D guess from
- vec2 ref2d = tc.xy + (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
+ vec2 ref2d = (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
// Offset the guess source a little according to a trivial
// checkerboard dither function and spec.a.
// This is meant to be similar to sampling a blurred version
@@ -298,6 +298,7 @@ void main()
// with low shinyness, and also to disguise our lameness.
float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
ref2d += normalize(ref2d)*14.0*(1.0-spec.a)*(checkerboard-0.5);
+ ref2d += tc.xy; // use as offset from destination
// get attributes from the 2D guess point
float refdepth = texture2DRect(depthMap, ref2d).a;
vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
index 70a1c53456..ddd69befc3 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl
@@ -292,7 +292,7 @@ void main()
//
depth -= 0.5; // unbias depth
// first figure out where we'll make our 2D guess from
- vec2 ref2d = tc.xy + (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
+ vec2 ref2d = (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
// Offset the guess source a little according to a trivial
// checkerboard dither function and spec.a.
// This is meant to be similar to sampling a blurred version
@@ -301,6 +301,7 @@ void main()
// with low shinyness, and also to disguise our lameness.
float checkerboard = floor(mod(tc.x+tc.y, 2.0)); // 0.0, 1.0
ref2d += normalize(ref2d)*14.0*(1.0-spec.a)*(checkerboard-0.5);
+ ref2d += tc.xy; // use as offset from destination
// get attributes from the 2D guess point
float refdepth = texture2DRect(depthMap, ref2d).a;
vec3 refpos = getPosition_d(ref2d, refdepth).xyz;