Fix T60803 Artifacts with SSR + Reflection Plane + 0 roughness
Tweaked the tracing parameters again to avoid rays terminated before first iteration.
This commit is contained in:
parent
44301175bb
commit
3600bb79d0
Notes:
blender-bot
2023-02-14 08:47:25 +01:00
Referenced by issue #63316, Alpha Hashed breaks SSR unless it's halfway transparent Referenced by issue #60803, SSR + Reflection Plane with 0 roughness cuts off/blinks reflection at certain view angles
|
@ -91,7 +91,7 @@ void prepare_raycast(
|
|||
|
||||
/* If the line is degenerate, make it cover at least one pixel
|
||||
* to not have to handle zero-pixel extent as a special case later */
|
||||
ss_step.xy += vec2((dot(ss_step.xy, ss_step.xy) < 0.000003) ? 0.001 : 0.0);
|
||||
ss_step.xy += vec2((dot(ss_step.xy, ss_step.xy) < 0.00001) ? 0.001 : 0.0);
|
||||
|
||||
/* Make ss_step cover one pixel. */
|
||||
ss_step /= max(abs(ss_step.x), abs(ss_step.y));
|
||||
|
@ -135,7 +135,7 @@ vec3 raycast(
|
|||
float max_time;
|
||||
prepare_raycast(ray_origin, ray_dir, thickness, index, ss_step, ss_start, max_time);
|
||||
|
||||
float max_trace_time = max(0.001, max_time - 0.01);
|
||||
float max_trace_time = max(0.01, max_time - 0.01);
|
||||
|
||||
#ifdef GROUPED_FETCHES
|
||||
ray_jitter *= 0.25;
|
||||
|
|
Loading…
Reference in New Issue