[Bf-blender-cvs] [5d8a7ba7deb] blender-v2.93-release: Fix T91728: Cycles render artifacts with motion blur and object attributes

Brecht Van Lommel noreply at git.blender.org
Tue Nov 2 13:52:38 CET 2021


Commit: 5d8a7ba7deb39863c60e49bfe694dfde6d3b488b
Author: Brecht Van Lommel
Date:   Mon Sep 27 17:38:53 2021 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rB5d8a7ba7deb39863c60e49bfe694dfde6d3b488b

Fix T91728: Cycles render artifacts with motion blur and object attributes

===================================================================

M	intern/cycles/kernel/geom/geom_motion_triangle.h

===================================================================

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);
   }



More information about the Bf-blender-cvs mailing list