Fix T55620 Artifacts with SSR and planar reflection
Was caused by 0 pixel extent rays which did not trace at all. Bumping the threshold for degenerate rays fixes it.
This commit is contained in:
parent
86646dab7c
commit
795bddf2bd
Notes:
blender-bot
2023-02-14 05:41:55 +01:00
Referenced by issue #55620, Artifacts with SSR and planar reflection
|
@ -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.000001) ? 0.001 : 0.0);
|
||||
ss_step.xy += vec2((dot(ss_step.xy, ss_step.xy) < 0.000003) ? 0.001 : 0.0);
|
||||
|
||||
/* Make ss_step cover one pixel. */
|
||||
ss_step /= max(abs(ss_step.x), abs(ss_step.y));
|
||||
|
|
Loading…
Reference in New Issue