glslSmartDeNoise icon indicating copy to clipboard operation
glslSmartDeNoise copied to clipboard

Using this shader with HDR tonemapping image: before or after?

Open Calinou opened this issue 3 years ago • 1 comments

I'm looking at integrating this denoising shader in Godot Engine and was wondering about denoising an HDR viewport. The engine uses a tonemapping shader to convert the viewport into a LDR image for display. For best results, should I run the denoising shader before or after tonemapping? My gut feeling tells me I should do this after tonemapping, but I'm not sure exactly.

This should be documented in the README and/or in the shader code. Thanks in advance for replying :slightly_smiling_face:

Calinou avatar Oct 19 '20 15:10 Calinou

Hi Hugo, and sorry for the late answer: I just got back to my home after one week of vacancy.

Before or after tone mapping? There is no absolute answer: it depends also on the nature of the original image.

In theory it would work better on original image (before tonemapping/bright/contrast/gamma adjustments). This because if with tone-mapping (or other algorithm) accentuates colors (and differences between they / near pixels), then the de-noise algorithm works less. But it's also true that if the tone-mapping (or any algorithm) "flattens" the image colors, the de-noise is more effective. So it depends from case to case.

In glChAoS.P, I use it before all image adjustments... but mine use is more to create a "stardust effect". I don't know if this helped you, but if you have any other doubts or need help, please let me know... from now on I should respond immediately

And thank you for considering inserting glslSmartDeNoise into your project Michele

BrutPitt avatar Oct 29 '20 01:10 BrutPitt