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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-28 04:28:57 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2013-11-28 05:11:42 +0400
commit44d1c92e60f85fd0d757b9fc503ae32284540814 (patch)
tree7697c22426e858aefa5c26529f63ad47adfc179f /intern/cycles/render/attribute.cpp
parent731ffd3cd4c1d578fb02d39dc512bace850c2e8b (diff)
Cycles: add ptex face ID and UV attributes.
Not the most memory efficient way to store these things but it's simple and implementing it better requires some work to natively support subd grids as a primitive in some way.
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r--intern/cycles/render/attribute.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index 319616450e1..6640439eca9 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -147,6 +147,10 @@ const char *Attribute::standard_name(AttributeStandard std)
return "particle";
else if(std == ATTR_STD_CURVE_INTERCEPT)
return "curve_intercept";
+ else if(std == ATTR_STD_PTEX_FACE_ID)
+ return "ptex_face_id";
+ else if(std == ATTR_STD_PTEX_UV)
+ return "ptex_uv";
return "";
}
@@ -246,6 +250,12 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
case ATTR_STD_MOTION_POST:
attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
break;
+ case ATTR_STD_PTEX_FACE_ID:
+ attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_FACE);
+ break;
+ case ATTR_STD_PTEX_UV:
+ attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_VERTEX);
+ break;
default:
assert(0);
break;