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.
This commit is contained in:
@@ -457,7 +457,7 @@ float3 OSLShader::volume_eval_phase(const ShaderClosure *sc, const float3 omega_
|
||||
int OSLShader::find_attribute(KernelGlobals *kg, const ShaderData *sd, uint id, AttributeElement *elem)
|
||||
{
|
||||
/* for OSL, a hash map is used to lookup the attribute by name. */
|
||||
int object = sd->object*ATTR_PRIM_TYPES + (sd->curve_seg != ~0);
|
||||
int object = sd->object*ATTR_PRIM_TYPES + (sd->segment != ~0);
|
||||
OSLGlobals::AttributeMap &attr_map = kg->osl->attribute_map[object];
|
||||
ustring stdname(std::string("geom:") + std::string(Attribute::standard_name((AttributeStandard)id)));
|
||||
OSLGlobals::AttributeMap::const_iterator it = attr_map.find(stdname);
|
||||
|
Reference in New Issue
Block a user