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/bvh/bvh2.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/bvh/bvh2.cpp')
-rw-r--r--intern/cycles/bvh/bvh2.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/intern/cycles/bvh/bvh2.cpp b/intern/cycles/bvh/bvh2.cpp
index 3e3a5d604d8..9aa8e71dfd0 100644
--- a/intern/cycles/bvh/bvh2.cpp
+++ b/intern/cycles/bvh/bvh2.cpp
@@ -312,14 +312,8 @@ void BVH2::refit_node(int idx, bool leaf, BoundBox& bbox, uint& visibility)
}
}
}
-
- visibility |= ob->visibility;
- if (ob->is_shadow_catcher)
- visibility &= ~PATH_RAY_SHADOW_NON_CATCHER;
- else
- visibility &= ~PATH_RAY_SHADOW_CATCHER;
+ visibility |= ob->visibility_for_tracing();
}
-
/* TODO(sergey): De-duplicate with pack_leaf(). */
float4 leaf_data[BVH_NODE_LEAF_SIZE];
leaf_data[0].x = __int_as_float(c0);