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>2017-08-10 10:19:40 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-10 10:21:02 +0300
commit5a618ab737225869555bb9782265a90f7ca2c373 (patch)
tree0b6d5f9d385f6266bb409aedf3cee36c203e6722 /intern/cycles/render/object.cpp
parentde3c1657132b404d8611134c24894f7157665c29 (diff)
Cycles: De-duplicate trace-time object visibility calculation
We already have enough files to worry about in BVH builders. no need to add yet another copy-paste code which is tempting to be running out of sync.
Diffstat (limited to 'intern/cycles/render/object.cpp')
-rw-r--r--intern/cycles/render/object.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 375abfeb27a..b00e5624266 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -262,6 +262,17 @@ bool Object::is_traceable()
return true;
}
+uint Object::visibility_for_tracing() const {
+ uint trace_visibility = visibility;
+ if (is_shadow_catcher) {
+ trace_visibility &= ~PATH_RAY_SHADOW_NON_CATCHER;
+ }
+ else {
+ trace_visibility &= ~PATH_RAY_SHADOW_CATCHER;
+ }
+ return trace_visibility;
+}
+
/* Object Manager */
ObjectManager::ObjectManager()