diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-10 17:07:55 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-10 17:07:55 +0300 |
commit | edb7195f27091b6c4acf8b4ab29e9bb2f468c64f (patch) | |
tree | 2607b7dcd876b8e7c39b24de03517444654d1796 /intern/cycles/kernel/geom/geom_motion_triangle.h | |
parent | b03ac8384389a4ad34bd6bcf0cc7be204c7ada9f (diff) |
Cycles: Bring back distance check in re-intersection
From more investigation of the numeric failures in the kernel it appears
the check was rather correct. But in theory it;s also needed for the motion
triangles.
Diffstat (limited to 'intern/cycles/kernel/geom/geom_motion_triangle.h')
-rw-r--r-- | intern/cycles/kernel/geom/geom_motion_triangle.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h index 3a4b20e61aa..d3297e05c67 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle.h @@ -130,6 +130,9 @@ ccl_device_inline float3 motion_triangle_refine(KernelGlobals *kg, ShaderData *s #ifdef __INTERSECTION_REFINE__ if(isect->object != OBJECT_NONE) { + if(UNLIKELY(t == 0.0f)) { + return P; + } #ifdef __OBJECT_MOTION__ Transform tfm = sd->ob_itfm; #else |