PotatoOfDoom / CyberFSR2

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

Support alternative parameters for checking if DLSS is available and modifying width/height #8

Closed mnxn closed 2 years ago

mnxn commented 2 years ago

As I mentioned in my previous comment (https://github.com/PotatoOfDoom/CyberFSR2/issues/2#issuecomment-1170843527), Dying Light 2 checks SuperSampling.FeatureInitResult to see if DLSS is available and modifies DLSS.Render.Subrect.Dimensions.Width/DLSS.Render.Subrect.Dimensions.Height to change the width/height.

This PR adds the new parameters to the NvParamTranslation map and handles them in the appropriate switch statements. With these changes, any game that uses these parameters will have the corresponding variables set instead of being silently ignored.

Note: while this is a start to supporting multiple games, it isn't sufficient since ViewMatrixHook will still need to have default values when it can't access a game's memory directly.

PotatoOfDoom commented 2 years ago

Thank you for your contribution.