Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-09-27 18:38:53 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-02 13:16:58 +0300
commit5d8a7ba7deb39863c60e49bfe694dfde6d3b488b (patch)
tree92e7c77512a7337de16886864c9184ededb7ba4e /intern
parent6489f2212b96fc7d2ab5abd23e487dd76e7b7c07 (diff)
Fix T91728: Cycles render artifacts with motion blur and object attributes
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/geom/geom_motion_triangle.h13
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 53d6b92dd7e..7f355afaa31 100644
--- a/intern/cycles/kernel/geom/geom_motion_triangle.h
+++ b/intern/cycles/kernel/geom/geom_motion_triangle.h
@@ -39,7 +39,18 @@ ccl_device_inline int find_attribute_motion(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);
}