4lex4nder / ReshadeEffectShaderToggler

Reshade 5+ addin to apply Reshade effects to render targets of shader groups based on a key press. It allows you to configure these groups from within the addin as well.
MIT License
89 stars 9 forks source link

Feature Suggestion: Add option to prioritize shaders within a shader group #22

Open OopyDoopy opened 12 months ago

OopyDoopy commented 12 months ago

To describe the problem, in some games there can be shaders that need to be worked around in cutscenes that might cause problems when used in gameplay. Having the option to prioritize certain shaders in a group would fix this issue. As is, it appears the addon will use whatever is earliest in the chain (which makes sense most of the time).

Alternatively, adding an option to only activate a shader group if another shader group is currently invalid would work, but I suspect the original suggestion is more flexible for any other issues I haven't personally encountered.

Probably not necessary to include this but my specific problem is in Castlevania Lords of Shadow. When trying to render some effects before transparency effects, it works great, but in the middle of the relevant shader chain is before and after the main character renders. In gameplay, I need it to render after the main character and before further transparent effects. In cutscenes without the main character, those relevant shaders aren't rendered and I have to select render targets that do not include the main character. If I select all of them in the toggle group, it always uses the targets before the main character is rendered, which isn't desirable.

And just to add, thank you so much for making this. This tool is a dream come true.

4lex4nder commented 9 months ago

Unfortunately, REST does not look ahead by design. Maybe it might help to try out different invocation locations for the group? BEFORE DRAW -> effects are applied to the bound render target before the first draw call of the selected shader. AFTER DRAW -> effects are applied to the bound render target after all draw calls are finished and a new shader is bound. ON RENDER TARGET CHANGE -> effects are applied to the bound render target after all shaders (starting with your selection) have finished drawing and a new render target is bound.