GPUOpen-LibrariesAndSDKs / FidelityFX-SDK

The main repository for the FidelityFX SDK.
Other
835 stars 80 forks source link

Understanding how FSR reverse depth works #66

Open StudenteChamp2 opened 4 months ago

StudenteChamp2 commented 4 months ago

My engine uses a reverse Z projection matrix. From my understanding of it the near plane is the camera NearZ while the far plane is Infinity. Normalized values will be in the [1, 0] range instead of traditional [0, 1]. https://iolite-engine.com/blog_posts/reverse_z_cheatsheet

But when I look at FSR sample, the cameraFar is set to the NearZ plane while the cameraNear is set to Infinity. FSR

I am confused. Shouldn't it be the contrary? Like the cameraFar being infinity while the cameraNear stays the NearZ

Thanks a lot for helping!