Chaining Shaders

  • SunBroDave
  • Topic Author
More
9 years 3 months ago #1 by SunBroDave Chaining Shaders was created by SunBroDave
Would it be possible at some point to support chaining multiple .fx files instead of just choosing either reshade.fx or sweet.fx, without the need to explicitly use include statements? In the current implementation, the possibilities of using multiple shaders from multiple different programmers are kind of squashed because the .fx files can't have conflicting references to variables and methods. Consequently, shaders need to be grouped into packages like mastereffect or sweetfx, and then users need to give up one package to use another. It would be incredible if the encapsulation of each shader file could be preserved, so that different shaders could be chained regardless of each file's individual implementation and naming conventions.

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

  • crosire
More
9 years 3 months ago #2 by crosire Replied by crosire on topic Chaining Shaders
While possible, it would definitly increase loading times. All the includes are resolved in the preprocessing step, which basicly produces one single piece of text containing the entire shader. This is then compiled, all the resources are created and those are used at runtime to draw the effects. Now if there are multiple files the compiler would need to kick in multiple times, slowing down the process.

So it's either one main shader entry point file and fast loading times or multiple shader files, but slow loading times. Would need some testing on how much it is slowed down and if that makes it worth the additional simplification for users.
The following user(s) said Thank You: SunBroDave

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

  • SunBroDave
  • Topic Author
More
9 years 3 months ago #3 by SunBroDave Replied by SunBroDave on topic Chaining Shaders
Sure yeah that makes a lot of sense. Thanks for looking into it.

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.