diff options
Diffstat (limited to 'intern/cycles/render')
-rw-r--r-- | intern/cycles/render/mesh.cpp | 15 | ||||
-rw-r--r-- | intern/cycles/render/object.cpp | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp index 273443034c5..295c934537a 100644 --- a/intern/cycles/render/mesh.cpp +++ b/intern/cycles/render/mesh.cpp @@ -341,6 +341,13 @@ void Mesh::add_vertex_normals() vN[i] = -vN[i]; } } + else if(flip) { + Attribute *attr_vN = attributes.find(ATTR_STD_VERTEX_NORMAL); + float3 *vN = attr_vN->data_float3(); + for(size_t i = 0; i < verts_size; i++) { + vN[i] = -vN[i]; + } + } /* motion vertex normals */ Attribute *attr_mP = attributes.find(ATTR_STD_MOTION_VERTEX_POSITION); @@ -375,6 +382,14 @@ void Mesh::add_vertex_normals() } } } + else if(has_motion_blur() && attr_mN && flip) { + for(int step = 0; step < motion_steps - 1; step++) { + float3 *mN = attr_mN->data_float3() + step*verts.size(); + for(size_t i = 0; i < verts_size; i++) { + mN[i] = -mN[i]; + } + } + } } void Mesh::pack_normals(Scene *scene, float *tri_shader, float4 *vnormal) diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 1f148d34ea6..027bfd71931 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -449,8 +449,6 @@ void ObjectManager::apply_static_transforms(DeviceScene *dscene, Scene *scene, u } object_flag[i] |= SD_TRANSFORM_APPLIED; - if(object->mesh->transform_negative_scaled) - object_flag[i] |= SD_NEGATIVE_SCALE_APPLIED; } else have_instancing = true; |