diff options
-rw-r--r-- | intern/cycles/kernel/geom/geom_motion_triangle.h | 3 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_triangle_intersect.h | 3 |
2 files changed, 6 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 diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h index 0674e8b62e8..30468efff91 100644 --- a/intern/cycles/kernel/geom/geom_triangle_intersect.h +++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h @@ -314,6 +314,9 @@ ccl_device_inline float3 triangle_refine(KernelGlobals *kg, #ifdef __INTERSECTION_REFINE__ if(isect->object != OBJECT_NONE) { + if(UNLIKELY(t == 0.0f)) { + return P; + } #ifdef __OBJECT_MOTION__ Transform tfm = sd->ob_itfm; #else |