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:
2020-10-23 02:00:41 +02:00
parent e58285dc1d
commit 3cc2dc40b3

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.