diff options
Diffstat (limited to 'intern/cycles/kernel/kernel_passes.h')
-rw-r--r-- | intern/cycles/kernel/kernel_passes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h index 828add9dc13..7841d3a5e09 100644 --- a/intern/cycles/kernel/kernel_passes.h +++ b/intern/cycles/kernel/kernel_passes.h @@ -91,6 +91,10 @@ ccl_device_inline void kernel_update_denoising_features(KernelGlobals *kg, if (sum_weight != 0.0f) { normal /= sum_weight; } + + /* Transform normal into camera space. */ + normal = transform_direction(&kernel_data.cam.worldtocamera, normal); + L->denoising_normal += ensure_finite3(state->denoising_feature_weight * normal); L->denoising_albedo += ensure_finite3(state->denoising_feature_weight * albedo); |