From 422fddab87aa2c3b7c27f7e6dd1887087e778277 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 10 Aug 2017 09:22:33 +0200 Subject: Cycles: Fix instanced shadow catcher objects influencing each other --- intern/cycles/bvh/bvh_build.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'intern/cycles/bvh/bvh_build.cpp') diff --git a/intern/cycles/bvh/bvh_build.cpp b/intern/cycles/bvh/bvh_build.cpp index 1880964355c..933e98fea01 100644 --- a/intern/cycles/bvh/bvh_build.cpp +++ b/intern/cycles/bvh/bvh_build.cpp @@ -865,7 +865,7 @@ BVHNode *BVHBuild::create_object_leaf_nodes(const BVHReference *ref, int start, prim_time[start] = make_float2(ref->time_from(), ref->time_to()); } - uint visibility = objects[ref->prim_object()]->visibility; + const uint visibility = objects[ref->prim_object()]->visibility_for_tracing(); BVHNode *leaf_node = new LeafNode(ref->bounds(), visibility, start, start+1); leaf_node->time_from = ref->time_from(); leaf_node->time_to = ref->time_to(); @@ -939,7 +939,7 @@ BVHNode* BVHBuild::create_leaf_node(const BVHRange& range, ref.time_to())); bounds[type_index].grow(ref.bounds()); - visibility[type_index] |= objects[ref.prim_object()]->visibility; + visibility[type_index] |= objects[ref.prim_object()]->visibility_for_tracing(); if(ref.prim_type() & PRIMITIVE_ALL_CURVE) { visibility[type_index] |= PATH_RAY_CURVE; } -- cgit v1.2.3