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
This commit is contained in:
Clément Foucault
2025-08-25 14:06:11 +02:00
committed by Clément Foucault
parent 87fe13fb7b
commit 5ed307f8aa

View File

@@ -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()