Commit: 8ced4417f97ecdafefe8a64104a131cc924633f3
Author: Dalai Felinto
Date:   Tue Sep 20 23:26:59 2016 +0000
Branches: master
https://developer.blender.org/rB8ced4417f97ecdafefe8a64104a131cc924633f3

Fix T49393: Baking ignores backfaces

For some reason (which I can't recall), backing was doing backface
culling. Since Cycles itself doesn't ignore them (nor does Blender
Internal), they should be visible.

===================================================================

M       source/blender/render/intern/source/bake_api.c

===================================================================

diff --git a/source/blender/render/intern/source/bake_api.c 
b/source/blender/render/intern/source/bake_api.c
index 1a0ef4e..73424a4 100644
--- a/source/blender/render/intern/source/bake_api.c
+++ b/source/blender/render/intern/source/bake_api.c
@@ -298,20 +298,16 @@ static bool cast_ray_highpoly(
                }
 
                if (hits[i].index != -1) {
-                       /* cull backface */
-                       const float dot = dot_v3v3(dir_high, hits[i].no);
-                       if (dot < 0.0f) {
-                               float distance;
-                               float hit_world[3];
-
-                               /* distance comparison in world space */
-                               mul_v3_m4v3(hit_world, highpoly[i].obmat, 
hits[i].co);
-                               distance = len_squared_v3v3(hit_world, co);
-
-                               if (distance < hit_distance) {
-                                       hit_mesh = i;
-                                       hit_distance = distance;
-                               }
+                       float distance;
+                       float hit_world[3];
+
+                       /* distance comparison in world space */
+                       mul_v3_m4v3(hit_world, highpoly[i].obmat, hits[i].co);
+                       distance = len_squared_v3v3(hit_world, co);
+
+                       if (distance < hit_distance) {
+                               hit_mesh = i;
+                               hit_distance = distance;
                        }
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to