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:
Diffstat (limited to 'intern/cycles/render/geometry.cpp')
-rw-r--r--intern/cycles/render/geometry.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/intern/cycles/render/geometry.cpp b/intern/cycles/render/geometry.cpp
index 6d084e82576..a8e4db38180 100644
--- a/intern/cycles/render/geometry.cpp
+++ b/intern/cycles/render/geometry.cpp
@@ -788,6 +788,11 @@ void GeometryManager::device_update_attributes(Device *device,
foreach (AttributeRequest &req, attributes.requests) {
Attribute *attr = geom->attributes.find(req);
+ /* Vertex normals are stored in DeviceScene.tri_vnormal. */
+ if (attr && attr->std == ATTR_STD_VERTEX_NORMAL) {
+ continue;
+ }
+
update_attribute_element_size(geom,
attr,
ATTR_PRIM_GEOMETRY,
@@ -854,6 +859,11 @@ void GeometryManager::device_update_attributes(Device *device,
Attribute *attr = geom->attributes.find(req);
if (attr) {
+ /* Vertex normals are stored in DeviceScene.tri_vnormal. */
+ if (attr->std == ATTR_STD_VERTEX_NORMAL) {
+ continue;
+ }
+
/* force a copy if we need to reallocate all the data */
attr->modified |= attributes_need_realloc[Attribute::kernel_type(*attr)];
}
@@ -877,6 +887,11 @@ void GeometryManager::device_update_attributes(Device *device,
Attribute *subd_attr = mesh->subd_attributes.find(req);
if (subd_attr) {
+ /* Vertex normals are stored in DeviceScene.tri_vnormal. */
+ if (subd_attr->std == ATTR_STD_VERTEX_NORMAL) {
+ continue;
+ }
+
/* force a copy if we need to reallocate all the data */
subd_attr->modified |= attributes_need_realloc[Attribute::kernel_type(*subd_attr)];
}