From 5ed307f8aab13cf89333cd48335a0b7c10959095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 25 Aug 2025 14:06:11 +0200 Subject: [PATCH] Fix: EEVEE: Bilateral denoiser has wrong color transform The transform used for accumulation space was not reciprocal and could modify the input intensity. Pull Request: https://projects.blender.org/blender/blender/pulls/144987 --- .../eevee/shaders/eevee_ray_denoise_bilateral_comp.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/draw/engines/eevee/shaders/eevee_ray_denoise_bilateral_comp.glsl b/source/blender/draw/engines/eevee/shaders/eevee_ray_denoise_bilateral_comp.glsl index 8fce53d41ef..4b1b03bde4d 100644 --- a/source/blender/draw/engines/eevee/shaders/eevee_ray_denoise_bilateral_comp.glsl +++ b/source/blender/draw/engines/eevee/shaders/eevee_ray_denoise_bilateral_comp.glsl @@ -32,11 +32,11 @@ COMPUTE_SHADER_CREATE_INFO(eevee_ray_denoise_bilateral) /* In order to remove some more fireflies, "tone-map" the color samples during the accumulation. */ float3 to_accumulation_space(float3 color) { - return color / (1.0f + reduce_add(color)); + return color / (1.0f + reduce_max(color)); } float3 from_accumulation_space(float3 color) { - return color / (1.0f - reduce_add(color)); + return color / (1.0f - reduce_max(color)); } void main()