diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-09-27 18:38:53 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-09-27 18:40:03 +0300 |
commit | 5bea5e25d52fe26b53928781ec0b1f5d4ddf5ad0 (patch) | |
tree | 5769d7157c92147c0f1026af25bf281a904fe640 /intern/cycles/kernel/geom | |
parent | 0559971ab3772e3b5efb0fcad396735ea4ac22fe (diff) |
Fix T91728: Cycles render artifacts with motion blur and object attributes
Diffstat (limited to 'intern/cycles/kernel/geom')
-rw-r--r-- | intern/cycles/kernel/geom/geom_motion_triangle.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h index eb4a39e062b..239bd0a37b2 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle.h @@ -41,7 +41,18 @@ ccl_device_inline int find_attribute_motion(const KernelGlobals *kg, uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset); while (attr_map.x != id) { - attr_offset += ATTR_PRIM_TYPES; + if (UNLIKELY(attr_map.x == ATTR_STD_NONE)) { + if (UNLIKELY(attr_map.y == 0)) { + return (int)ATTR_STD_NOT_FOUND; + } + else { + /* Chain jump to a different part of the table. */ + attr_offset = attr_map.z; + } + } + else { + attr_offset += ATTR_PRIM_TYPES; + } attr_map = kernel_tex_fetch(__attributes_map, attr_offset); } |