diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-15 16:30:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-21 17:25:10 +0300 |
commit | 5fddc4a3b12832af1d06a782b35d5035955bcae8 (patch) | |
tree | b5b48d7dd590f8b87c5284cfb25a19f3c02cd256 /intern | |
parent | cab2ca7a24602b725a7cc730c54a961b8e240daa (diff) |
Fix T101065: wrong denoising depth after ray precision improvements
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/film/passes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/film/passes.h b/intern/cycles/kernel/film/passes.h index 1f5cf2048f1..c25fbd486f5 100644 --- a/intern/cycles/kernel/film/passes.h +++ b/intern/cycles/kernel/film/passes.h @@ -42,8 +42,8 @@ ccl_device_forceinline void kernel_write_denoising_features_surface( if (kernel_data.film.pass_denoising_depth != PASS_UNUSED) { const float3 denoising_feature_throughput = INTEGRATOR_STATE( state, path, denoising_feature_throughput); - const float denoising_depth = ensure_finite(average(denoising_feature_throughput) * - sd->ray_length); + const float depth = sd->ray_length - INTEGRATOR_STATE(state, ray, tmin); + const float denoising_depth = ensure_finite(average(denoising_feature_throughput) * depth); kernel_write_pass_float(buffer + kernel_data.film.pass_denoising_depth, denoising_depth); } |