PotatoOfDoom / CyberFSR2

FidelityFx Super Resolution 2.0 for Cyberpunk
MIT License
620 stars 67 forks source link

Recognize sharpness parameter #9

Closed mnxn closed 2 years ago

mnxn commented 2 years ago

Although Sharpness is a valid value for NvParameter, it is never reached in the switch statements because the NvParamTranslation map is missing an entry with a "Sharpness" key. The Dx12ParameterImpl::Sharpness field is initialized to 1.0f, which means that FSR would always run with a full sharpness value.

In this PR, I add this parameter to the map to allow the Sharpness field to be modified.

Surprisingly, the sharpness in Cyberpunk already appears to change without this PR. I believe Cyberpunk is using an additional sharpening post-processing effect after the FSR stage which caused the missing Sharpness entry to be overlooked. However, in Dying Light 2, the image sharpness previously did not change regardless of the in-game sharpness slider. I can confirm that this PR enables a changing sharpness value in that game.

PotatoOfDoom commented 2 years ago

Oh, seems like I forgot to add that switch. Thank you for your contribution.