Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-09-15 16:30:11 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-09-15 17:04:24 +0300
commit5b216aae8b3d53b0360f7c60f5197bdd88e322ca (patch)
tree8e4e62adc6b60c547c44230fead5d137bfc8611e /intern
parentfbc74c9d938cd06eb952cc1d66f7d00fb00b50ea (diff)
Fix T101065: wrong denoising depth after ray precision improvements
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/film/denoising_passes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/film/denoising_passes.h b/intern/cycles/kernel/film/denoising_passes.h
index 1517e8bad56..dfc21d787f2 100644
--- a/intern/cycles/kernel/film/denoising_passes.h
+++ b/intern/cycles/kernel/film/denoising_passes.h
@@ -30,8 +30,8 @@ ccl_device_forceinline void film_write_denoising_features_surface(KernelGlobals
if (kernel_data.film.pass_denoising_depth != PASS_UNUSED) {
const Spectrum 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);
film_write_pass_float(buffer + kernel_data.film.pass_denoising_depth, denoising_depth);
}