FidelityFX-SDK icon indicating copy to clipboard operation
FidelityFX-SDK copied to clipboard

Understanding the FSR 3 exposure

Open StudenteChamp2 opened this issue 11 months ago • 3 comments

I am integrating FSR3 support in our software: https://gpuopen.com/fidelityfx-super-resolution-3/

The documentation says an exposure should be provided when evaluating super sampling, but it is set to nullptr. What is the meaning of that exposure? Is it a 2D texture that should contain the tone mapping exposure?

Exposure

Thanks for helping!

StudenteChamp2 avatar Mar 22 '24 20:03 StudenteChamp2

The exposure is a 1x1 float texture with a scale value. The scale value represent a factor to expose the image. If you pass null you should set the flag FFX_FSR3_ENABLE_AUTO_EXPOSURE. In this case the exposure is computed internally.

If you take a capture you will notice that the internal exposure texture is actually a 1x1 float2 texture. The red channel is the exposure factor, and the green channel is the log of the average luminosity used to compute the exposure.

Hope this help.

VeganPower avatar Mar 28 '24 16:03 VeganPower

Hello Vegan,

Thank you very much for helping. You say "The green channel is the log of the average luminosity used to compute the exposure.". Where did you get that information?

StudenteChamp2 avatar May 14 '24 18:05 StudenteChamp2

From this line of code here: https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/release-FSR3-3.0.4/sdk/include/FidelityFX/gpu/fsr3upscaler/ffx_fsr3upscaler_compute_luminance_pyramid.h#L55

Here the log of the texture is computed, the reduction does the average of the logs, and in line 85 the shader store the current average on the green channel. Also is a very common technique to compute the luminosity.

VeganPower avatar May 15 '24 00:05 VeganPower