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
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-10-25 20:30:19 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-26 15:48:44 +0300
commiteb1fed9d60a03cc5f9e648a1efaf89019bc2d8bd (patch)
tree7f9ea6537ff9403954ff1dc2174a735d2c53c73d /intern/cycles/kernel/kernel_passes.h
parent16a8d0fab07513bcafb3f3bd09ac9c880638816b (diff)
Cycles: restore Denoising Depth pass, when enabling Denoising Data passes
This is still useful in some cases even if not used by OpenImageDenoise. In the future this may be replaced with a more generic system to control render passes and filtering, but for now this just does what it did before.
Diffstat (limited to 'intern/cycles/kernel/kernel_passes.h')
-rw-r--r--intern/cycles/kernel/kernel_passes.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/kernel/kernel_passes.h b/intern/cycles/kernel/kernel_passes.h
index ab8d7a26f44..8ff7750c7d5 100644
--- a/intern/cycles/kernel/kernel_passes.h
+++ b/intern/cycles/kernel/kernel_passes.h
@@ -52,6 +52,14 @@ ccl_device_forceinline void kernel_write_denoising_features_surface(
ccl_global float *buffer = kernel_pass_pixel_render_buffer(kg, state, render_buffer);
+ 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);
+ kernel_write_pass_float(buffer + kernel_data.film.pass_denoising_depth, denoising_depth);
+ }
+
float3 normal = zero_float3();
float3 diffuse_albedo = zero_float3();
float3 specular_albedo = zero_float3();