Welcome, Guest.
Username: Password: Remember me

TOPIC: PreCompiled Shaders file

PreCompiled Shaders file 6 months 4 weeks ago #1

  • piltrafus
  • piltrafus's Avatar
  • Offline
  • Posts: 72
  • Thank you received: 15
Crosire,
this idea may be completely nonsense but what do you think about the possibility for Reshade to output a single file with the compiled shaders and settings so you can use it instead of the full text files shader pack.

The beauty of reshade is of course its ability to compile the shader plain text files so you can keep tweaking it forever. However, sometimes you just want to play the game with a reshade presset, and pause to take screenshots as you go. For that you may be switching resolutions often, forcing reshade to recompile every time you switch. If the shader list is long the compile time and little waits add up and can get a bit annoying. Also some old games, emulators, etc, keep changing resolutions often between the game itself and menus, also forcing a recompile every time.

I was wondering if it could be possible at all to add some sort of option/pragma that forces reshade to spit a single file with the compiled shaders and settings and then, every time a recompile is needed, check first for that file and use it to skip recompiling.
If is present in the folder then use it. If not, proceed to recompile the text files. If a tweak is needed the user just has to delete that file to force reshade to read again the text shader files.
That could make reshade way more agile and smooth within the gaming/screenshooting experience.

Nonsense?
Last Edit: 6 months 4 weeks ago by piltrafus.
The administrator has disabled public write access.

PreCompiled Shaders file 6 months 4 weeks ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1385
I had that idea for a while now, to store a cache so loading goes faster. The problem is that the way the shaders are stored in memory currently, serializing and dezerializing them to/from a cache is probably just as slow as simply parsing them again each time. So it's not worth the effort right now. Maybe at some point.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: piltrafus

PreCompiled Shaders file 6 months 4 weeks ago #3

  • piltrafus
  • piltrafus's Avatar
  • Offline
  • Posts: 72
  • Thank you received: 15
Glad to hear is something you have considered. Let's hope at some point there's a way to make it work.
Thanks for the answer.

Regards.
The administrator has disabled public write access.

PreCompiled Shaders file 6 months 4 weeks ago #4

  • piltrafus
  • piltrafus's Avatar
  • Offline
  • Posts: 72
  • Thank you received: 15
Related question:
does the compiling speed depend on the graphics card processing power or it doesn't vary much from one card/computer to another?
The administrator has disabled public write access.

PreCompiled Shaders file 6 months 4 weeks ago #5

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2437
  • Thank you received: 1385
Latter. Most of the process is done on the CPU. About 2/3 being the ReShade FX compiler and 1/3 the HLSL/GLSL compiler of the driver.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: piltrafus