Fix T51506: Wrong shadow catcher color when using selective denoising

This commit is contained in:
Lukas Stockner 2017-05-19 03:47:09 +02:00
parent 29f4a8510c
commit cf1127f380
Notes: blender-bot 2023-02-14 06:59:06 +01:00
Referenced by issue #51506, shadow catcher + denoiser bug
1 changed files with 10 additions and 1 deletions

View File

@ -356,7 +356,16 @@ ccl_device_inline void kernel_write_result(KernelGlobals *kg, ccl_global float *
# endif
if(kernel_data.film.pass_denoising_clean) {
float3 noisy, clean;
path_radiance_split_denoising(kg, L, &noisy, &clean);
#ifdef __SHADOW_TRICKS__
if(is_shadow_catcher) {
noisy = L_sum;
clean = make_float3(0.0f, 0.0f, 0.0f);
}
else
#endif /* __SHADOW_TRICKS__ */
{
path_radiance_split_denoising(kg, L, &noisy, &clean);
}
kernel_write_pass_float3_variance(buffer + kernel_data.film.pass_denoising_data + DENOISING_PASS_COLOR,
sample, noisy);
kernel_write_pass_float3_unaligned(buffer + kernel_data.film.pass_denoising_clean,