Commit: c2535dff902641ab331301fb8edc788c2c132a34
Author: Clément Foucault
Date:   Fri Oct 23 02:00:41 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBc2535dff902641ab331301fb8edc788c2c132a34

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.

===================================================================

M       source/blender/draw/engines/eevee/shaders/raytrace_lib.glsl

===================================================================

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.

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to