Pass uniforms to shader before preprocessor

More
3 years 9 months ago - 3 years 9 months ago #1 by Marty McFly
Pass uniforms to shader before preprocessor was created 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?
Last edit: 3 years 9 months ago by Marty McFly.

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

More
3 years 9 months ago #2 by crosire
Replied by crosire on topic Pass uniforms to shader before preprocessor
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.

More
3 years 9 months ago #3 by Marty McFly
Replied by Marty McFly on topic Pass uniforms to shader before preprocessor
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.

More
3 years 9 months ago - 3 years 9 months ago #4 by crosire
Replied by crosire on topic Pass uniforms to shader before preprocessor
ENB knows exactly which preprocessor defines its shaders has. ReShade does not.
Last edit: 3 years 9 months ago by crosire.

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

More
3 years 9 months ago #5 by Marty McFly
Replied by Marty McFly on topic Pass uniforms to shader before preprocessor
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.

More
3 years 9 months ago #6 by crosire
Replied by crosire on topic Pass uniforms to shader before preprocessor
Was removed. It does log everything by default now.

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