Cycles code refactor: changes to make adding new primitive types easier.

This commit is contained in:
Brecht Van Lommel
2014-03-29 13:03:46 +01:00
parent 24ad7e0bea
commit 0509553b5e
24 changed files with 191 additions and 189 deletions

View File

@@ -27,7 +27,7 @@ ccl_device void svm_node_attr_init(KernelGlobals *kg, ShaderData *sd,
uint id = node.y;
uint attr_offset = sd->object*kernel_data.bvh.attributes_map_stride;
#ifdef __HAIR__
attr_offset = (sd->segment == ~0)? attr_offset: attr_offset + ATTR_PRIM_CURVE;
attr_offset = (sd->type & PRIMITIVE_ALL_TRIANGLE)? attr_offset: attr_offset + ATTR_PRIM_CURVE;
#endif
uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset);