diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2016-09-21 02:26:59 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2016-09-21 13:39:54 +0300 |
commit | 8ced4417f97ecdafefe8a64104a131cc924633f3 (patch) | |
tree | 08676aa92cb29fd6ce21fb8fc5d64d8d73e8d288 /source | |
parent | 166286e6de36afa318b7fd80266dc88a47726308 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/render/intern/source/bake_api.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/source/blender/render/intern/source/bake_api.c b/source/blender/render/intern/source/bake_api.c index 1a0ef4e64d4..73424a4e846 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; } } } |