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
Notes: blender-bot 2023-02-14 10:36:33 +01:00
Referenced by issue #40320, Deformation Motion Blur makes objects render in wrong render layer?
1 changed files with 14 additions and 7 deletions

View File

@ -327,14 +327,21 @@ 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)) {
isect->prim = triAddr;
isect->object = object;
isect->type = PRIMITIVE_MOTION_TRIANGLE;
isect->u = u;
isect->v = v;
isect->t = 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;
isect->u = u;
isect->v = v;
isect->t = t;
return true;
return true;
}
}
return false;