Nukem9 / dlssg-to-fsr3

Adds AMD FSR 3 Frame Generation to games by replacing Nvidia DLSS-G Frame Generation (nvngx_dlssg).
GNU General Public License v3.0
4.27k stars 161 forks source link

Marvel's Midnight Suns - mod doesn't initialize #329

Open xv0t opened 8 months ago

xv0t commented 8 months ago

Trying both methods (DLSSTweaks and nvngx.dll), the mod never hooks with the game. DLSSTweaks works just fine and reports injecting _dlssg_dlsstweakswrapper.dll in its log, but the dll never shows up on the .exe when using ProcessExplorer (_dlssg_tofsr3.log is never created, FG option is grayed out).

When using the nvngx.dll method, _dlssg_to_fsr3_amd_isbetter.dll never hooks to the .exe

Using the Jedi Survivor workaround of renaming nvngx.dll to dxgi.dll results in an instant game crash upon launch (any other name, such as d3d12.dll, version.dll, winmm.dll, winhttp.dll crashes the game, psapi.dll is completely ignored).

Force injecting _dlssg_to_fsr3_amd_isbetter.dll to the game doesn't enable the FG option.

For the sake of testing, tried CyberFSR2 by PotatoOfDoom and it hooks and works, aswell as DLSSTweaks mentioned above, no idea what's going on.

RTX gpu

jojodunet commented 8 months ago

Just in case, here's a lead to test: Is HDR currently activated on your end, and if yes, could you please attempt the DLSSFG mod with HDR disabled? (it will also help confirm that the current version of the mod 0.81, and earlier, doesn't work with the game)

In certain configurations, this game is stubborn with FG if HDR is activated.

https://steamcommunity.com/app/368260/discussions/0/3768984714328260816/ https://www.reddit.com/r/midnightsuns/comments/10nlki1/dlss_3_frame_generation_not_working_properly_with/

xv0t commented 8 months ago

No HDR on my monitor.

VRaverna commented 8 months ago

There was a report that someone managed to get it to work by using https://github.com/nitrog0d/DLSSSpoofer but I can't compile that and using version.dll of DLSSSpoofer caused the game to crash just like if we rename dlssg to fsr2's dll file to version.dll.

Using non dlsstweaks version doesn't work and no log file created. Renaming to other dll name caused the game fail to start. Using dlsstweaks version, I can verify dlsstweaks load but frame generation doesn't work.

If DLSSSpoofer method is work for some users, maybe that is because Midnight Suns is hardcoded to check if the RTX cards are 40 series or newer so stop RTX 20/30 series from enabling instead of letting nvidia's dlssg dll to decide if it supports frame generation.

Is it possible to add a feature like DLSSSpoofer to dlssg to fsr3 project? Or maybe it is more suitable to add to dlsstweaks?

jojodunet commented 8 months ago

Wait for a new mod release; a fix could be implemented (soon) to make stubborn games believe that they are running on an NVIDIA Ada Lovelace graphics card to unlock the FG option.

ZHDarkstar commented 8 months ago

I think the problem might have to do with where the mod is looking for nvngx_dlssg.dll. I was able to get a log to generate by placing a copy of nvngx_dlssg.dll in \SteamLibrary\steamapps\common\Marvel's Midnight Suns\Engine\Plugins\NVIDIA\DLSS\Binaries\ThirdParty\Win64\ but the nvngx_dlssg.dll that comes with the game is located in \SteamLibrary\steamapps\common\Marvel's Midnight Suns\Engine\Plugins\Runtime\Nvidia\Streamline\Binaries\ThirdParty\Win64\ instead.

Here's one of the logs I was able to get the mod to generate. I even gave it 12 minutes on this attempt to see if anything would change beyond NVSDK_NGX_D3D12_PopulateParameters_Impl, but nothing happened, which is in stark contrast to the 12 or so seconds it takes the mod to get past that step in Starfield. dlssg_to_fsr3.log

xv0t commented 8 months ago

Interesting finding! Perhaps this is also what happens with Returnal and other Unreal Engine 4 games?

ZHDarkstar commented 8 months ago

dbghelp.dll method works. Place in \Engine\Binaries\ThirdParty\DbgHelp

VRaverna commented 8 months ago

Thanks. I got it works too with the new version and put the dlls in Engine\Binaries\ThirdParty\DbgHelp. So you need 0.90 and also rename it to dbghelp.dll and put it in that folder.

xv0t commented 8 months ago

awesome news! got it working, however the slightest camera movement results in doubled image, my guess is it will improve in later versions MidnightSuns-Win64-Shipping_2024_01_10_04_15_20_740