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.
This commit is contained in:
Sergey Sharybin 2015-02-10 19:07:55 +05:00
parent b03ac83843
commit edb7195f27
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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