Uber shader?

  • NoMansReshade
  • Topic Author
More
6 years 4 months ago - 6 years 4 months ago #1 by NoMansReshade Uber shader? was created by NoMansReshade
Question for professional reshaders: Would an uber shader (AKA, a shader with multiple shaders combined into one) result in any performance boost? And if so, why is this not being done? Also, wouldn't it make more sense for HDR colors (to avoid reshade's pesky HDR trimming)? For example, have a reverse tonemapping shader (for HDR colors without quality) first, AA shader second, then a sharpen shader, then bloom and color corrections, as well as any other shaders... Sort of a game development approach (except for the reverse tonempping part lol). I am asking for professional's thoughts on this before I go combining complicated shaders :P Please and thank you for any answers!
Last edit: 6 years 4 months ago by NoMansReshade.

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

  • FierySwordswoman
More
6 years 4 months ago - 6 years 4 months ago #2 by FierySwordswoman Replied by FierySwordswoman on topic Uber shader?
I'm no HLSL expert, but...

I doubt the performance gains would warrant such a shader. They'd probably be minor in a best case scenario where you're fully utilizing all aspects of the combined shader. Also, you can already merge any color grading shaders using a LUT.

There are places for "uber shaders", though, as they let the different effects talk to each other and behave in a standardized way.
For example, Cycles' Principled BSDF shader:

However, I don't think this'd be necessary in ReShade. Re-ordering the effects is generally enough, and I think some of Ganossa's shaders can already cross-communicate.
Last edit: 6 years 4 months ago by FierySwordswoman.

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

  • kingeric1992
More
6 years 4 months ago - 6 years 4 months ago #3 by kingeric1992 Replied by kingeric1992 on topic Uber shader?
the difference would be like from 300 fps to 302 fps, and if you combine some of the multipass effect properly, you would go from 300 fps down to 10 fps no kidding. (ie, AA and sharpen in a single pass.)
single texture R/W of a shader isn't a bottleneck in most of the use case
Last edit: 6 years 4 months ago by kingeric1992.

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

  • ShoterXX
More
6 years 4 months ago #4 by ShoterXX Replied by ShoterXX on topic Uber shader?
Having an "uber shader" should indeed not only improve performance by a significant amount, but also quality(if you wanna be really picky, that is) for most smaller effects. If you check CeeJay's SweetFX for ReShade 2, you'll notice that he does this already. For example, just having a straight read/write pass will drop me about single frame at 4K, on my 1070 (from 67 to 66). When you add up 5 or 6 different effects, it'll start to matter.

However.

This is not always the best solution, nor doable. Bluring often requires multiple passes, and you can do this within your own set of effects, but it'll probably be minor, and it'll add a constant performance impact, since you can't disable it the same way you do in ReShade 3 (though you can still use defines for that), not to mention the lack of modularity it implies.

And ReShade does not use HDR, only an 8-bit buffer. You can't tonemap colors that ain't there.

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

  • NoMansReshade
  • Topic Author
More
6 years 3 months ago - 6 years 3 months ago #5 by NoMansReshade Replied by NoMansReshade on topic Uber shader?
You clearly didn't grasp the entirety of my question. You can reverse a tonemapped image to get the HDR color values with lost accuracy. This kind of HDR is not one of "bit" nature. 10-bit, 8-bit denote the color values being mapped to a 2D image, I'm talking about values larger than 255 and then mapping those to the "natural" space of 255 through tonemapping :P

( More info could be found in this thread: reshade.me/forum/shader-discussion/2888-reverse-tonemapping )

Anyways, I have concluded that this indeed is not a viable solution. I will, however be exploring the possibility of combing "bright" effects such as bloom and tonemapping.
Last edit: 6 years 3 months ago by NoMansReshade.

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.