Welcome, Guest.
Username: Password: Remember me

TOPIC: Shader INSTANCING

Shader INSTANCING 1 year 4 months ago #1

  • piltrafus
  • piltrafus's Avatar
  • Offline
  • Posts: 85
  • Thank you received: 16
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?
The administrator has disabled public write access.

Shader INSTANCING 1 year 4 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2780
  • Thank you received: 1581
In theory not particular hard with the new system. The only problem is telling apart all the duplicated uniforms.
Cheers, crosire =)
The administrator has disabled public write access.

Shader INSTANCING 1 year 4 months ago #3

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: 1 year 4 months ago by kingeric1992.
The administrator has disabled public write access.
The following user(s) said Thank You: piltrafus

Shader INSTANCING 1 year 4 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2780
  • Thank you received: 1581
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).
Cheers, crosire =)
The administrator has disabled public write access.