-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need some help making this work on Horizon Zero Dawn #10
Comments
Just a word of caution, decompiling is illegal in many parts of the world. |
Oh, I thought as the DLL was not loaded by the game at all, it had to do with some check. Thanks anyway, I am closing it for now and editing original post to remove some stuffs. |
@Xontaro why do you think your solution is hacky? Didn't you just patched ViewMatrixHook? |
@imniko Oh, I thought I deleted my original post for good, but you got a hold of it. So yeah I patched the ViewMatrixHook, sadly I only found the location of the FOV and not the Near and FarPlane. As @mnxn wrote in another issue, approximating their values is usually close enough, so I did that.
Hacky is indeed probably not the right word for it, more like unfinished and unwilling to develop it further. I just don't see much value in what I've done. |
Yah, this mod is good as proof of concept, but unless ghosting and transparent objects are handled it wont be worth it if you can do away without it. Or absolutely cant run the game otherwise. |
I think the game checks for nvidia driver or something, the game does not load the dll for me at all maybe because I have AMD GPU. |
Finally I managed to find the check which was disabling DLSS for AMD GPU, for reference the address value is 00007FF64D28ADC4, I had to edit the JNE/JNZ to JE/JZ (which wont work in nvidia btw) I also don't know how to patch exe's using DLLmain, so I wont be creating a fork. Now, how FSR 2.0 looks? some stuffs looks really good, but some stuffs that normally needs a reactive mask (e.g. hair/beard, fur on cloths, smoke, rain etc) has horrible aliasing, because those are rendered in lower resolution and aren't upscaled by FSR 2.0, these are also affecting the surrounding objects. Foliage also looks like mush due to ghosting and snow flakes also has ghosting. Anyway, I was more curious as to why some were saying that this mod loads on HZD, but I couldn't make it work on my PC, its because of a different check, I don't exactly know what it checks but patching that line was the key for me. I will keep this issue opened for now, if mod improves (I hope it does) and someone decides to add support for this game. |
@imniko Sorry that I mislead you with my initial comment, but I simply wasn't aware of that, since I'm using a Nvidia GPU. |
Its okay, I don't think getting the camera reference will make it any better (don't know how to get that reference anyway) as I compiled the repo supporting external config and changing FOV, far/near clip had almost no effect. |
You can nop the 6 bytes responsible for making the decision to load nvngx instead of switching the jz to a jnz then it will work on all drivers/gpus. |
Yep, that's the way to go once support is need to be added for that game, but right now FSR 2.0 has major issues in this game. |
Looks like the given address is absolute and can be different every time (in my case it was 0x7FF6FF6BADC4). So for those who want to try it - the relative address (to the base) is 0x1FADC4. Just fill it with 6 'nop's like the RealIndica pointed out (to do this you can use nvngxLoader from his fork). |
@lnfecteDru @imniko I've been trying to follow these instructions, but not really into IDA so it's more like hitting my head on the wall atm. I followed the relative address, but can't figure out which 6 are the ones you have to "nop" out. Any way you could show me or something? |
Hello! There are 2 bytes defining the instruction (JNZ/JNE) and 4 bytes of address. In IDA it is probably shown as a single command (something like JNE XX XX XX XX), which you just have to fill with NOPs (it's opcode is 0x90 so the sequence will look like '90 90 90 90 90 90'). EDIT: But the easiest approach is still using RealIndica's nvngxLoader. Just clone his RDRFSR2 repository, then in nvngxLoader/dllmain.cpp remove everything related to _SIG_VER (lines 9 and 22) and change the value of _GPU_CHK (line 8) to 0x1FADC4 and compile the nvngxLoader project (you don't need to compile the CyberFSR project). Then copy the compiled 'd3d11.dll' file to your game directory (right next to 'nvngx.dll'). EDIT2: Also, if you still want to do this manually, notice, that the game checks ability to use DLSS before the game window even appear so you have to start the game right in IDA so it will activate the breakpoint before the check. |
@lnfecteDru Thanks for the guide! Ended up using the nvngxLoader method you mentioned. Seems to have worked out fine as DLSS option was exposed and available. The Steam Overlay was not working (neither in RDR2, but I was expecting that), only problem was neither did RTSS overlay for some reason (which does in RDR2), so that was weird. And as was previously mentioned, guessing the transparency mask regarding Aloy's hair, fur and particles isn't working/being upscaled, resulting in the distorted outer lines. Btw, for future reference regarding your EDIT2 - IDA has Debugger with Run and Attach options. So the order should be Debugger - Run - Local Windows Debugger - game exe to catch the checks? Terminating the process/detaching the debugger also gives save memory snapshot with all segments or loaded only. Also sorry if I'm bothering you! |
From my experience, RTSS overlay works in RDR2 under Vulkan but not D3D12. Probably, RTSS uses 'd3d11.dll' as injected dll name too for D3D games but not for Vulkan ones.
Not sure about this one since I'm using x64dbg
Feel free to ask, this is what github issues exist for! |
Interesting, works fine for me on DX12 with FSR2 mod. Didn't try Vulkan so can't comment on that.
Also have x64dbg, so that works too. Open file then Debugger - Run? |
Come to discord guys! and let discuss it there. |
Yes, File -> Open. You also may need to enable checkbox 'Entry breakpoint' under 'Events' section in Options -> Preferences |
May be you can use this mod to load FSR2 But Anoy's hair , grass and trees are really strange |
I got RTSS working by adding making a new profile for RDR2.exe, opening the .cfg file for the profile, finding [RendererDirect3D12] and adding D3D11on12=0 under it |
I wonder what could be done to improve that... EDIT : bit of info here |
I just wanted to see if I could get the dll loaded in HZD,
I installed IDA and tried to find relevant string, but I am still not sure if I am on right direction or how to get the reg value. It does have the following part though, but I am unable to figure out what to do next.Edit: I think the game checks for some nvidia driver/registry because I am unable to get the dll loaded in the game as I have AMD gpu, another user (nvidia GPU) confirmed that the DLL loads on their PC, so its probably checks for nvidia stuffs or something
The text was updated successfully, but these errors were encountered: