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-07-23 10:54:49 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-07-23 11:00:52 +0400
commit9fcaac5009b567edc59c4831b6a0580211d1d290 (patch)
tree001d9951652c731a71b21ad58a9ed473ab33294e /intern/cycles/render
parent54109add6578da9f306973e2e224664e2d63e534 (diff)
Fix T41147: Static BVH shading problem
Fix T41079: Solid black render of object with negative scale and smooth shading In both cases the issue was caused by negative scaled objects with single mesh users for which scale gets applied when using static BVH. Since the on-fly normals calculation land normals for such cases weren't flipped leading them to point to a wrong direction. Added a special object flag for this, which is a bit of a bummer because now we've got less bits for real useful things, but this is the only way to get proper normals without adding more complexity in the on-fly calculations.
Diffstat (limited to 'intern/cycles/render')
-rw-r--r--intern/cycles/render/object.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 027bfd71931..1f148d34ea6 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -449,6 +449,8 @@ 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;