diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-10-23 03:00:41 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-10-28 11:26:02 +0300 |
commit | c2535dff902641ab331301fb8edc788c2c132a34 (patch) | |
tree | 8451c7a3b69aeb8a0b78fa4b0156cc5d69ef6291 /source/blender | |
parent | 70d78635003c2b4c12be4abd3ccada5d30cf1ac1 (diff) |
Fix T81942 EEVEE: Reflection Plane glitch with low clip distances
This was happening because the raytrace was not even being performed
due to the tracing line being too small after frustum clipping.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl index f88cfdf3787..41395758d92 100644 --- a/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl +++ b/source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl @@ -104,9 +104,10 @@ void prepare_raycast(vec3 ray_origin, /* Clip to segment's end. */ max_time /= length(ss_step.xyz); - /* Clipping to frustum sides. */ max_time = min(max_time, line_unit_box_intersect_dist(ss_start.xyz, ss_step.xyz)); + /* Avoid no iteration. */ + max_time = max(max_time, 1.0); /* Convert to texture coords. Z component included * since this is how it's stored in the depth buffer. |