diff options
Diffstat (limited to 'intern/cycles/kernel/film/accumulate.h')
-rw-r--r-- | intern/cycles/kernel/film/accumulate.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/kernel/film/accumulate.h b/intern/cycles/kernel/film/accumulate.h index 6345430e4f4..d6a385a4bff 100644 --- a/intern/cycles/kernel/film/accumulate.h +++ b/intern/cycles/kernel/film/accumulate.h @@ -352,6 +352,12 @@ ccl_device_inline void kernel_accum_emission_or_background_pass(KernelGlobals kg pass_offset = pass; } else if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) { + /* Don't write any light passes for shadow catcher, for easier + * compositing back together of the combined pass. */ + if (path_flag & PATH_RAY_SHADOW_CATCHER_HIT) { + return; + } + if (path_flag & PATH_RAY_SURFACE_PASS) { /* Indirectly visible through reflection. */ const float3 diffuse_weight = INTEGRATOR_STATE(state, path, pass_diffuse_weight); @@ -437,6 +443,12 @@ ccl_device_inline void kernel_accum_light(KernelGlobals kg, if (kernel_data.film.light_pass_flag & PASS_ANY) { const uint32_t path_flag = INTEGRATOR_STATE(state, shadow_path, flag); + /* Don't write any light passes for shadow catcher, for easier + * compositing back together of the combined pass. */ + if (path_flag & PATH_RAY_SHADOW_CATCHER_HIT) { + return; + } + if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) { int pass_offset = PASS_UNUSED; |