From fc38276d74e1d451663c70f82e7f54293d24bbe4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 1 Aug 2017 23:40:38 +0200 Subject: Fix Cycles shadow catcher objects influencing each other. Since all the shadow catchers are already assumed to be in the footage, the shadows they cast on each other are already in the footage too. So don't just let shadow catchers skip self, but all shadow catchers. Another justification is that it should not matter if the shadow catcher is modeled as one object or multiple separate objects, the resulting render should be the same. Differential Revision: https://developer.blender.org/D2763 --- intern/cycles/bvh/bvh2.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'intern/cycles/bvh/bvh2.cpp') diff --git a/intern/cycles/bvh/bvh2.cpp b/intern/cycles/bvh/bvh2.cpp index 340ba7dcf53..3e3a5d604d8 100644 --- a/intern/cycles/bvh/bvh2.cpp +++ b/intern/cycles/bvh/bvh2.cpp @@ -314,6 +314,10 @@ 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; } /* TODO(sergey): De-duplicate with pack_leaf(). */ -- cgit v1.2.3