NarutoUA / gta5_fsr

This mod replaces original Grand Theft Auto V upscaler with FidelityFx Super Resolution 1.0
MIT License
508 stars 36 forks source link

FSR 2 compatibility using DXVK #91

Open Franck-Nein opened 1 year ago

Franck-Nein commented 1 year ago

While FSR 2.x is not compatible with DirectX 11, it is compatible with Vulkan, so it may be possible to use DXVK, which allows you to run DX11 games on Vulkan, to translate GTA 5's DirectX 11 graphics to Vulkan, enabling FSR 2.x support. I know a similar approach has been used to enable FSR 2 on games that already have support for DLSS, for example in Diablo II: Resurrected you replace dxgi.dll, d3d11.dll and d3d12.dll with the ones from DXVK and VKD3D making the game use Vulkan (in this case It's used to spoof the GPU to a GeForce RTX 3080 to enable the DLSS 2 option on an AMD GPU), and replacing nvngx.dll and nvngx.ini with the ones from the Cyberpunk 2077 mod FidelityFx Super Resolution 2.1 - FPS boost mod

Snipy44 commented 1 year ago

but is gta not cyberpunk ?

Franck-Nein commented 1 year ago

The mod works in Control, Metro Exodus: Enhanced Edition, Hogwarts Legacy, Atomic Heart, Returnal, Red Dead Redemption 2, A Plague Tale: Requiem, Horizon: Zero Dawn, Guardians of the Galaxy, Spider-man, etc More complete spreadsheet As far as I know, both DLSS and FSR dll are generic, you can usually replace the whatever version comes with a game with the one from a newer one to update it, and it should work as long as the mayor version is the same. From the FSR Mod description (abridged): "Both FSR 2 and Nvidia DLSS work very similar, both need similar data to work. NVIDIA publishes its DLSS implementation as a dll file. This allows us to simply replace it with our own that translates NVIDIA DLSS to FSR 2 commands, Wine or DXVK work similarly." As long as a game has the nvngx.dll you should be able to install and use the Cyberpunk mod without making any other change to the game.

Snipy44 commented 1 year ago

How to use it for FiveM pleas ? :)

ILyesMk2 commented 1 year ago

wait. is it possible to swap DLLs for diffrent version like Forza Horizon 5's FSR for eaxmple? (just ignore the fact that FH5 has fsr2)

MiRw3b commented 1 year ago

@Franck-Nein the problem with this, is that dxvk doesnt seems to (yet) work with gta 5, i've tried and i guess i should've backed up my d3d dlls from gta 5.

Franck-Nein commented 1 year ago

@ILyesMk2 You usually can, as long as you stay within the same mayor version it is likely to work, it may fail if you are downgrading to a version that doesn't support a feature the game relies on, but other than that, there should not ve any issue.

Franck-Nein commented 1 year ago

@MiRw3b I know I have played it on Linux, so it should work fine, also It has a GOLD rating on Protondb, maybe try using the most recent dxvk-gplasync or version 2.1 from https://gitlab.com/Ph42oN/dxvk-gplasync Also, you should be able to delete the d3d DLL from the game's folder, and it should just use the ones on sytem32, if that fails, download the original dlls (Uploaded by me, so here are the Virus Total results)

Snipy44 commented 1 year ago

do you think is possible to add frame generation ?

MiRw3b commented 1 year ago

@MiRw3b I know I have played it on Linux, so it should work fine, also It has a GOLD rating on Protondb, maybe try using the most recent dxvk-gplasync or version 2.1 from https://gitlab.com/Ph42oN/dxvk-gplasync Also, you should be able to delete the d3d DLL from the game's folder, and it should just use the ones on sytem32, if that fails, download the original dlls (Uploaded by me, so here are the Virus Total results)

also the thing is that i tried on windows, not sure it its 100% compatible on windows