diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-31 18:23:42 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-31 18:23:42 +0100 |
commit | 784e83462b19c0fbea6656e2a845a1f3ab4b1e70 (patch) | |
tree | 6018ef51eb7b5f020bcc68af8f7c4301b891bf4a /indra/newview/app_settings/shaders/class1 | |
parent | 0997cbe2f5240295cf46d99840c46da2bd099531 (diff) |
debug ssreflection blur direction. minor.
Diffstat (limited to 'indra/newview/app_settings/shaders/class1')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl index 4646bd4d40..155f03fdcf 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/softenLightF.glsl @@ -290,7 +290,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 @@ -299,6 +299,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; |