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
This commit is contained in:
Brecht Van Lommel
2017-08-01 23:40:38 +02:00
parent dc4d850d10
commit fc38276d74
15 changed files with 98 additions and 136 deletions

View File

@@ -649,7 +649,6 @@ ccl_device_inline float kernel_path_integrate(KernelGlobals *kg,
state.flag |= (PATH_RAY_SHADOW_CATCHER |
PATH_RAY_SHADOW_CATCHER_ONLY |
PATH_RAY_STORE_SHADOW_INFO);
state.catcher_object = sd.object;
if(!kernel_data.background.transparent) {
L->shadow_background_color =
indirect_background(kg, &emission_sd, &state, &ray);
@@ -783,7 +782,7 @@ ccl_device_inline float kernel_path_integrate(KernelGlobals *kg,
#endif /* __SUBSURFACE__ */
#ifdef __SHADOW_TRICKS__
*is_shadow_catcher = (state.flag & PATH_RAY_SHADOW_CATCHER);
*is_shadow_catcher = (state.flag & PATH_RAY_SHADOW_CATCHER) != 0;
#endif /* __SHADOW_TRICKS__ */
#ifdef __KERNEL_DEBUG__