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

Possible forgotten use of FSR_RCAS_DENOISE?

Open CptLucky8 opened this issue 4 years ago • 2 comments

Hi,

We're implementing FSR in our project https://github.com/mbucchia/OpenXR-Toolkit and you have done an amazing job. It has been very easy to integrate and it is giving very good results in VR.

I might be wrong but unless the shader compiler optimizes this out, it seems to me the following 3 lines of code could be enclosed in a #ifdef FSR_RCAS_DENOISE block, otherwise the shader is computing the nz value for nothing:

https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/a21ffb8f6c13233ba336352bdff293894c706575/ffx-fsr/ffx_fsr1.h#L737-L739

Thanks!

CptLucky8 avatar Jan 16 '22 22:01 CptLucky8

I might be wrong but unless the shader compiler optimizes this out

It might be worth checking the generated assembly with http://shader-playground.timjones.io/ to make sure :slightly_smiling_face:

Calinou avatar Jun 22 '22 19:06 Calinou

@Calinou Thank you for the hint.

I might be wrong but unless the shader compiler optimizes this out,...

I've just tried for the sake of it and it did optimize this out. The #ifdef block would have probably expressed this directly, saving time by just glancing at the source code though 🙂

CptLucky8 avatar Dec 12 '22 21:12 CptLucky8