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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-08-13 14:19:12 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-08-13 14:35:54 +0400
commitbfaf4f2d0d4e600f6f8e253033de2b05a93e3ec1 (patch)
tree3299b51ca6994b30900da058176df1f5c4ef5848 /intern/cycles/render/mesh.cpp
parent8d801c3afd39d66d249c8b7e45249339ad297fcf (diff)
Fix T41219: Cycles backface detection doesn't work properly
Root of the issue goes back to the on-fly normals commit and the latest fix for it wasn't actually correct. I've mixed two fixes in there. So the idea here goes back to storing negative scaled object flag and flip runtime-calculated normal if this flag is set, which is pretty much the same as the original fix for the issue from me. The issue with motion blur wasn't caused by the rumtime normals patch and it had issues before, because it already did runtime normals calculation. Now made it so motion triangles takes the negative scale flag into account. This actually makes code more clean imo and avoids rather confusing flipping code in mesh.cpp.
Diffstat (limited to 'intern/cycles/render/mesh.cpp')
-rw-r--r--intern/cycles/render/mesh.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/intern/cycles/render/mesh.cpp b/intern/cycles/render/mesh.cpp
index 295c934537a..273443034c5 100644
--- a/intern/cycles/render/mesh.cpp
+++ b/intern/cycles/render/mesh.cpp
@@ -341,13 +341,6 @@ 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);
@@ -382,14 +375,6 @@ 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)