Shader INSTANCING

  • piltrafus
  • Topic Author
More
8 years 3 months ago #1 by piltrafus Shader INSTANCING was created by piltrafus
Is it possible to introduce shader INSTANCES in reshade 3.0?

Let's say a shader.fx file has three main parts:
-SETTINGS
-SHADER CODE
-TECHNIQUES

Maybe there's a way for reshade to read the Shader.fx file and load first the SETTINGS and SHADER CODE. Store those parts somehow and then the PIPELINE.CFG should only stipulate the execution of the TECHNIQUES portion of the shaders. So you should be able to have shader INSTANCES, meaning to execute the technique of a shader multiple times at different steps in the pipeline.
That would offer a whole new level of freedom and creativity to users. And, perhaps for reshade 4.0, if you find a way to pass custom #defines/Settings to different INSTANCEs of a shader you're close to performing a miracle. Saint Crosire, the pixel healer maybe?

Does it make sense?

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

  • crosire
More
8 years 3 months ago #2 by crosire Replied by crosire on topic Shader INSTANCING
In theory not particular hard with the new system. The only problem is telling apart all the duplicated uniforms.

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

  • kingeric1992
More
8 years 3 months ago - 8 years 3 months ago #3 by kingeric1992 Replied by kingeric1992 on topic Shader INSTANCING
namespace perhaps?

manually, you can totally duplicate the file and change the namespace to have the same effect multiple times.

or with something like this to readdress namespace of same effect file.
#define effect_namespace name0
#include "effect_file"
#undef effect_namespace
#define effect_namespace name1
#include "effect_file"
#undef effect_namespace
to allow fast setup.
Last edit: 8 years 3 months ago by kingeric1992.
The following user(s) said Thank You: piltrafus

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

  • crosire
More
8 years 3 months ago #4 by crosire Replied by crosire on topic Shader INSTANCING
I meant how they are organized in the GUI. The naming itself should be up to the shader developer, not ReShade (so you could do something like you mentioned, but don't have to).

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.