Skip to content
Snippets Groups Projects
Commit 79d2c591 authored by Tofu Linden's avatar Tofu Linden
Browse files

ss reflections: make the guess less far from the source.

parent 69622d8e
No related branches found
No related tags found
No related merge requests found
......@@ -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.5 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
vec2 ref2d = tc.xy + (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
// get attributes from the 2D guess point
float refdepth = texture2DRect(depthMap, ref2d).a;
vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
......
......@@ -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.5 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
vec2 ref2d = tc.xy + (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
// get attributes from the 2D guess point
float refdepth = texture2DRect(depthMap, ref2d).a;
vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
......
......@@ -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.5 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
vec2 ref2d = tc.xy + (0.25 * screen_res.y) * (refnorm.xy) * abs(refnorm.z) / depth;
// get attributes from the 2D guess point
float refdepth = texture2DRect(depthMap, ref2d).a;
vec3 refpos = getPosition_d(ref2d, refdepth).xyz;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment