Trying to port a ultility and have some questions

  • CodeManJames
  • Topic Author
More
6 years 10 months ago #1 by CodeManJames Trying to port a ultility and have some questions was created by CodeManJames
So there's this utility for Witcher 3 that changes the ReShade/SweetFX preset automatically when you move form zone to zone. This was accomplished in the old Reshade by writing to the current config file that ReShade has loaded. On this new ReShade I can't seem to find where it write its configs to compared to the old one. In the old one it would use this:

string presetCurrentReShade[5] = { "ReShade\\BasicFX.cfg", "ReShade\\CustomFX.cfg", "ReShade\\GemFX.cfg", "ReShade\\McFX.cfg", "ReShade\\SweetFX.cfg" };

But now I can't seem to figure out the folder structure for the new one. Can anyone help?
The following user(s) said Thank You: jminternelia

Please Log in or Create an account to join the conversation.

  • Evan20xx
More
6 years 10 months ago - 6 years 9 months ago #2 by Evan20xx Replied by Evan20xx on topic Trying to port a ultility and have some questions
With ReShade 3.0, once you create a preset the .ini should be created along side to where you installed the .dll



PUBG_Enhancer_v1_1.ini being the presets config file.

I hope this is what you were looking for.
Last edit: 6 years 9 months ago by Evan20xx.

Please Log in or Create an account to join the conversation.

  • jminternelia
More
6 years 3 months ago - 6 years 3 months ago #3 by jminternelia Replied by jminternelia on topic Trying to port a ultility and have some questions
I started trying to figure this out. I am a total novice at this stuff, but Insofar as I can tell, he has it set up to point to Reshade Preset locations:
Warning: Spoiler!


With ReShade 3, the presets aren't stored in individual config files like older versions. The entire preset is in a single .ini file. Also, Reshade's shaders now store the individual default values for each shader in the shader itself, making pointing to each shader's configuration moot. So, in acknowledgement of that, wouldn't it be coded as below?

Warning: Spoiler!


If so, then where I am getting stumped is where the individual .cfg files are interpreted as below. In essence, from what it looks like, he is reading each config file within each preset to get the values for the shaders. I included a snippet of his code to show what I am referring to (lines 483-924 of the source code .cpp):

Warning: Spoiler!


Instead of having separate "pointers" to each .cfg file (that no longer exist for ReShade 3), wouldn't having a single "pointer" for each preset work, or can this be eliminated altogether since we already pointed to the preset? (My guess is no, since he isn't reading the preset values in fields 351-393). If my assumption is correct, would the following be likely the correct solution?

Warning: Spoiler!


If I am correct, then all that needs done is for someone to compile this, but I am probably not right. In any case, here's what the .cpp would look like if I am correct:

Warning: Spoiler!
Last edit: 6 years 3 months ago by jminternelia.

Please Log in or Create an account to join the conversation.

  • Chavolatra
More
6 years 3 months ago #4 by Chavolatra Replied by Chavolatra on topic Trying to port a ultility and have some questions
and this works ?

Please Log in or Create an account to join the conversation.

  • JTLB
More
6 years 2 months ago #5 by JTLB Replied by JTLB on topic Trying to port a ultility and have some questions
GW2Hook a version of ReShade built for GuildWars2, has this function. Maybe try and contact him.

04348.github.io/Gw2Hook/index.html

Please Log in or Create an account to join the conversation.

  • Neo_Bambi
More
5 years 21 hours ago #6 by Neo_Bambi Replied by Neo_Bambi on topic Trying to port a ultility and have some questions
Been trying to get Different SFX or ReShade Presets For Each Location working on reshade v3+ and I've seen your solution and I want to try it but I have no idea where to put the .cpp file. Does anybody know where?

Please Log in or Create an account to join the conversation.

  • vinkrogel
More
4 years 9 months ago #7 by vinkrogel Replied by vinkrogel on topic Trying to port a ultility and have some questions
I was working on this last night. Unfortunately, it seems ReShade no longer detects changes to ini or shader files and auto reloads. I've asked for clarification here:
reshade.me/forum/general-discussion/5064...of-reshade-gui#34696

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.