PotatoOfDoom / CyberFSR2

FidelityFx Super Resolution 2.0 for Cyberpunk
MIT License
615 stars 66 forks source link

Compilation instructions unclear - renaming #72

Closed KingOwnageXV closed 1 year ago

KingOwnageXV commented 1 year ago

This part isn't making sense to me

Which one? You named two, but then say compile DLL as in singular, and its not like you can rename both or one would be overwritten. Instructions aren't clear

chemputer commented 1 year ago

Neither of the two. It's a different dll entirely. Admittedly, I'm not 100% on this, but I'm pretty sure.

Since the two files in the FidelityFX Directory are dependencies for the main project (the dll you're renaming to nvngx.dll is what you're compiling after opening the sln file in VS2022 and compiling it) as it is, as I understand it, providing the functionality for XeSS, DLSS, NIS, FSR 1.0 and FSR2 into the game, so you already have those two files or you compile them along the way, doesn't matter, then once you have them, you can compile what is ultimately nvngx.dll, as that will allow the game to use the various "external" Upscaling APIs FSR2 so that's why you need both of the FSR2 dll files but also another dll, which you compile from the source code and the VS sln file.

Hope that makes some sense.

I agree that the instructions need some clarification. Perhaps something along the lines of "Rename the dll you compiled in Visual Studio 2022 located in X location relative to the root of the source directory."

I'm not sure. I haven't built it yet myself, I am looking to see if I can get it working for Hogwarts Legacy to get FSR 2.2 working, or perhaps even the FSR 3.0 alpha (once the source is released).

KingOwnageXV commented 1 year ago

Thank you but even this response doesn't answer which of the two dll's to rename. You said neither but then said the dll you rename is the one you compile from the sln file, but those are the two dll's you get when you compile the sln file.

Overall instructions unclear. I learned how to compile FSR source code myself a bit ago so this is purely just for getting it to work by replacing DLSS. I'm a tech savvy person but I'm kind of lost. I would have to figure it out through trial and error which I'm not motivated to

chemputer commented 1 year ago

Okay, let's go through this step by step.

Those two DLLs are what you get from Step 2.

You can't just simply rename one of those DLLs to nvngx.dll because the project isn't simply replacing DLSS with FSR2, it's adding the ability to use FSR2 with it. Does that make any sense?

  1. Clone this repo with all of its submodules.
  2. Compile the FSR 2.0 submodule in external/FidelityFX-FSR2 as instructed in official documentation. Note: I used the GenerateSolutionsDLL.bat but I am sure static libraries will work fine too.
  3. Open the CyberFSR.sln with Visual Studio 2022.
  4. Hit Compile.
  5. Copy the compiled ffx_fsr2_api_dx12_x64.dll and ffx_fsr2_api_x64.dll from the FidelityFX Directory to your Cyberpunk 2077 executable directory.
  6. Rename the compiled DLL to nvngx.dll.
  7. Run the EnableSignatureOverride.reg to allow Cyberpunks DLSS implementation to load unsigned DLSS versions
  8. Run the game and set the quality in the DLSS settings
  9. Play the game with FSR 2.0

Just to be clear here, there's a reason you go beyond step 2, and that steps 3 and 4 exist, no? When you do step 2, you get the two FSR-related DLLs. Set those aside in your mind for a bit. Do step 3, and then 4. Step 4 should generate a different DLL entirely. yes? That's the one to rename. Based on the [https://github.com/PotatoOfDoom/CyberFSR2/blob/main/.github/workflows/build.yml] build config(url) it should end up in (root)\x64\Release\*.dll or possibly (root)\x64\Debug\*.dll

If that does not help, there's one other suggestion I have. After you do step 4, run this command from Powershell in the root directory of your git repo. It'll generate a file and directory tree so we can see where everything is. Either attach it or use pastebin, whatever works best.

Get-ChildItem | tree /f > tree.log

I have not had the time to actually do this myself yet, so my advice may be off base, I do not know, but the instructions seem pretty clear to me just based on the logic of how this has to work along with the build flow that was used in GitHub Actions before the dev removed that, so if my attempts to help you with YOUR issue does not help, then hopefully the actual dev can. I'm trying my best to help you, but you're skirting the edge of being slightly rude and it's not like anyone is getting paid here. I understand, more than you know, that you're probably pretty frustrated, but please try to realize that the person on the other end is literally just someone trying their best to help you.

And frankly, if it were one of the two DLLs, which I am pretty confident it's not, is the process of trial and error there really that much effort? You rename one file, if it doesn't work, try the other. Simple as. But again, there should be a 3rd DLL.

I'm with you that it should be clearer, but I don't think it's unparsable.

chemputer commented 1 year ago

Just built it, and yes, I was correct. You'll find it within [root]/x64/Release/nvngx.dll (no rename needed if you built it under Release), or else [root]/x64/Debug/CyberFSR.dll (which you'd rename to nvngx.dll).

With [root] being the root folder of the git repo.

Hope that helps!

KingOwnageXV commented 1 year ago

Okay, let's go through this step by step.

Those two DLLs are what you get from Step 2.

You can't just simply rename one of those DLLs to nvngx.dll because the project isn't simply replacing DLSS with FSR2, it's adding the ability to use FSR2 with it. Does that make any sense?

  1. Clone this repo with all of its submodules.
  2. Compile the FSR 2.0 submodule in external/FidelityFX-FSR2 as instructed in [official documentation](https://github.com/GPUOpen-Effects/FidelityFX-FSR2#quick-start-checklist). Note: I used the GenerateSolutionsDLL.bat but I am sure static libraries will work fine too.
  3. Open the CyberFSR.sln with Visual Studio 2022.
  4. Hit Compile.
  5. Copy the compiled ffx_fsr2_api_dx12_x64.dll and ffx_fsr2_api_x64.dll from the FidelityFX Directory to your Cyberpunk 2077 executable directory.
  6. Rename the compiled DLL to nvngx.dll.
  7. Run the EnableSignatureOverride.reg to allow Cyberpunks DLSS implementation to load unsigned DLSS versions
  8. Run the game and set the quality in the DLSS settings
  9. Play the game with FSR 2.0

Just to be clear here, there's a reason you go beyond step 2, and that steps 3 and 4 exist, no? When you do step 2, you get the two FSR-related DLLs. Set those aside in your mind for a bit. Do step 3, and then 4. Step 4 should generate a different DLL entirely. yes? That's the one to rename. Based on the [https://github.com/PotatoOfDoom/CyberFSR2/blob/main/.github/workflows/build.yml] build config(url) it should end up in (root)\x64\Release\*.dll or possibly (root)\x64\Debug\*.dll

If that does not help, there's one other suggestion I have. After you do step 4, run this command from Powershell in the root directory of your git repo. It'll generate a file and directory tree so we can see where everything is. Either attach it or use pastebin, whatever works best.

Get-ChildItem | tree /f > tree.log

I have not had the time to actually do this myself yet, so my advice may be off base, I do not know, but the instructions seem pretty clear to me just based on the logic of how this has to work along with the build flow that was used in GitHub Actions before the dev removed that, so if my attempts to help you with YOUR issue does not help, then hopefully the actual dev can. I'm trying my best to help you, but you're skirting the edge of being slightly rude and it's not like anyone is getting paid here. I understand, more than you know, that you're probably pretty frustrated, but please try to realize that the person on the other end is literally just someone trying their best to help you.

And frankly, if it were one of the two DLLs, which I am pretty confident it's not, is the process of trial and error there really that much effort? You rename one file, if it doesn't work, try the other. Simple as. But again, there should be a 3rd DLL.

I'm with you that it should be clearer, but I don't think it's unparsable.

Let's get a couple things cleared up

  1. This guide right here has helped me get it, because it explained that its referring to a different dll. Telling you to compile a dll that gives you two then instantly saying rename a dll is bad instructions, regardless if you got it or not because of "logic" doesn't exonerate the instructions themselves not making this clear
  2. Do not treat me like I'm stupid for not getting it. Like saying "YOUR issue" unnecessarily like I'm the only person in the world who was confused and am just an absolute dumbass is rude behavior which is rich since you accused me of being rude when I clearly wasn't. I was just asking for this confusing step to be explained in a bit more detail, and asked for further clarification.

But thanks for the help regardless.

chemputer commented 1 year ago

Do not treat me like I'm stupid for not getting. Like saying "YOUR issue" unnecessarily like I'm the only person in the world who was confused and am just an absolute dumbass is rude behavior which is rich since you accused me of being rude when I clearly wasn't. I was just asking for this confusing step to be explained in a bit more detail, and asked for further clarification.

I didn't. I respectfully and politely pointed out that you were getting uncomfortably close to being slightly rude is all, and you definitely were. The rest is all in your imagination there, bud.

I also said I agreed with you that the instructions should be clearer. That said, if I can figure it out on my own pretty much instantly without having even built the software based on how it has to work, it's not that unclear. But there's a particular point where if you compile it under Release, you don't even rename the DLL as it's already nvngx.dll and you only rename it if you compile it as Debug, then you have to rename it. This absolutely needs clarification.

If this is how you are going to behave when someone voluntarily helps you, regardless of whether they are affiliated with the project or not, with an issue that you are having, you really don't belong on GitHub and should learn how to act respectfully towards others.

I hope anyone reading this thread in the future can make a determination for themselves whether helping someone like you is worth their time or not.

Reported and blocked.