Pass uniforms to shader before preprocessor

  • Posts: 1221
3 years 6 months ago - 3 years 6 months ago #1 by Marty McFly
Hey,
not sure if this is possible or not, but there could be a handier way to handle preprocessor options. Currently you have to manually type them into the respective box in the UI.
Using uniforms such as booleans in the preprocessor, it ends up using the default value declared in the shaderfile. But what if directing the user settings from the ini is handled before the preprocessor does its text stitching? That way the preprocessor uses the current setting you use and after next reload, your setting is active. You can control the whole shader just with the settings tab, no need to manually type in the preprocessor definitions in the box.
Imho this is more user friendly than the current solution. ENBSeries does the same for internal shaders, however this doesn't work for the external fx files.
Opinions?

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

  • Posts: 3747
3 years 6 months ago #2 by crosire
There is no way for ReShade to know which preprocessor directives exist as options. Also the preprocessor is invoked during compilation which happens before the UI is loaded, on startup. Changing an option would need a recompile.

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

  • Posts: 1221
3 years 6 months ago #3 by Marty McFly
Yes, I'm aware that changes still need recompilation. It's just that you could tweak in settings area and press reload instead of manually inserting those preprocessor options into the UI. As I have no insight how ENB works internally, what would you say how that works?

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

  • Posts: 3747
3 years 6 months ago - 3 years 6 months ago #4 by crosire
ENB knows exactly which preprocessor defines its shaders has. ReShade does not.

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

  • Posts: 1221
3 years 6 months ago #5 by Marty McFly
Ah I see. Alright, then forget I've asked. On another note, where did the tracelog feature go?

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

  • Posts: 3747
3 years 6 months ago #6 by crosire
Was removed. It does log everything by default now.

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