Fix T40320: wrong render layer visibility with cycles deformation motion blur.

This commit is contained in:
Brecht Van Lommel
2014-05-23 16:10:07 +02:00
parent 4c9587d754
commit f8ce417eba

View File

@@ -327,6 +327,12 @@ ccl_device_inline bool motion_triangle_intersect(KernelGlobals *kg, Intersection
float t, u, v;
if(ray_triangle_intersect_uv(P, dir, isect->t, verts[2], verts[0], verts[1], &u, &v, &t)) {
#ifdef __VISIBILITY_FLAG__
/* visibility flag test. we do it here under the assumption
* that most triangles are culled by node flags */
if(kernel_tex_fetch(__prim_visibility, triAddr) & visibility)
#endif
{
isect->prim = triAddr;
isect->object = object;
isect->type = PRIMITIVE_MOTION_TRIANGLE;
@@ -336,6 +342,7 @@ ccl_device_inline bool motion_triangle_intersect(KernelGlobals *kg, Intersection
return true;
}
}
return false;
}