diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-03 16:09:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-03 16:09:09 +0400 |
commit | bf25f1ea96d01b513907cf3067e8e2dd3c7e41b4 (patch) | |
tree | 822c28fa6ecf5e08c051e5eb7a05f6bc6e2e8742 /intern/cycles/kernel/svm | |
parent | 57cf48e7c6fd04f864072c21433a822907774f78 (diff) |
Cycles Hair: refactoring to store curves with the index of the first key and the
number of keys in the curve, rather than curve segments with the indices of two
keys. ShaderData.segment now stores the segment number in the curve.
Diffstat (limited to 'intern/cycles/kernel/svm')
-rw-r--r-- | intern/cycles/kernel/svm/svm_attribute.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_geometry.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/svm/svm_attribute.h b/intern/cycles/kernel/svm/svm_attribute.h index f11b69138d1..ea0a31610f1 100644 --- a/intern/cycles/kernel/svm/svm_attribute.h +++ b/intern/cycles/kernel/svm/svm_attribute.h @@ -28,7 +28,7 @@ __device void svm_node_attr_init(KernelGlobals *kg, ShaderData *sd, /* find attribute by unique id */ uint id = node.y; uint attr_offset = sd->object*kernel_data.bvh.attributes_map_stride; - attr_offset = (sd->curve_seg == ~0)? attr_offset: attr_offset + ATTR_PRIM_CURVE; + attr_offset = (sd->segment == ~0)? attr_offset: attr_offset + ATTR_PRIM_CURVE; uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset); while(attr_map.x != id) { diff --git a/intern/cycles/kernel/svm/svm_geometry.h b/intern/cycles/kernel/svm/svm_geometry.h index db8bbabe0ec..a04f4ea0fa7 100644 --- a/intern/cycles/kernel/svm/svm_geometry.h +++ b/intern/cycles/kernel/svm/svm_geometry.h @@ -155,7 +155,7 @@ __device void svm_node_hair_info(KernelGlobals *kg, ShaderData *sd, float *stack switch(type) { case NODE_INFO_CURVE_IS_STRAND: { - data = !(sd->curve_seg == ~0); + data = (sd->segment != ~0); stack_store_float(stack, out_offset, data); break; } |