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.
This commit is contained in:
Clément Foucault 2020-10-23 02:00:41 +02:00
parent e58285dc1d
commit 3cc2dc40b3
Notes: blender-bot 2023-02-14 06:47:29 +01:00
Referenced by issue #81942, Reflection Plane causing problems at certain clip distances
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 2 additions and 1 deletions

View File

@ -115,9 +115,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.