How would you prefer a bloom effect?

  • luluco250
  • Topic Author
More
6 years 2 weeks ago - 6 years 2 weeks ago #1 by luluco250 How would you prefer a bloom effect? was created by luluco250
Hi, I know I haven't updated my effects in a while here, but I've been working on them from time to time, occasionally dumping them in my FXShaders repository at github, but now I want to "officially" update the ones in the official reshade-shaders repository.

Now I have some doubts about how I should proceed with this, so before I go into technical details I'll simply ask this: Do you prefer quality over performance/less memory consumption?

Now for the technical jargon:

I've updated MagicBloom (which is ironically now version 3, "skipping" 2) to use an inverse tonemapper which provides better results than the usual pow() thresholding. It's not perfect, but looks convincing enough in HDR games while still being quite customizable to fit LDR ones.

Meanwhile I've also implemented and discovered different ways to process the effect.

One way, the way MagicBloom (1) does it is to simply make sequentially blurred copies of the source image into various textures, then combine them all into one, while also taking the adaptation value from the a mipmap texture (which could be one of the blurred ones, or the final maybe), which works best with PoT resolutions (deprecated OpenGL like the one Minecraft uses refuses to make mipmaps out of non PoT textures, I've learned this the hard way hence why version 2 was redone into 3, which is all PoT).

Now, having a lot of textures is a memory waster and uses more passes, and can only reasonably be done using single-pass blurring (otherwise you'd need double the textures), so from version 2 and on I implemented an alternative way, based on how Minecraft SEUS' bloom does it: you create a texture with many "virtual"/mini textures inside it (hard to explain I know) then you simply blur the entire thing, which can be done in two-pass using only two textures, and combined with PoT resolutions already solves the problem of getting and adaptation value.

This of course has a drawback: the quality is somewhat degraded and it's extremely painful to maintain (trying to avoid one image from bleeding into another is hell) and from what I've seen most bloom implementations just go with multiple textures anyway. Also this uses less passes obviously.

So what do you prefer? One method ensures quality, no weird texture bleeding problems and is also much simpler to maintain, but potentially costs more. The other is more complex in a way but also simplifies the blurring process, although at the potential cost of quality.

I want your opinion before proceeding.
Last edit: 6 years 2 weeks ago by luluco250.
The following user(s) said Thank You: Flamex, SandyCheeks

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

  • Martigen
More
6 years 2 weeks ago #2 by Martigen Replied by Martigen on topic How would you prefer a bloom effect?
Firstly, love your work, MagicBloom is fantastic :)

Secondly, I guess it depends on the costs -- what performance cost over the other method are we talking? What cost to quality between them are we talking? (any comparison screenshots?)

In an ideal world I'd say implement both and provide a toggle for people to switch between them, but I imagine that's even _more_ work :)

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

  • Marty McFly
More
6 years 2 weeks ago #3 by Marty McFly Replied by Marty McFly on topic How would you prefer a bloom effect?
Actually, there's a compromise that doesn't take too much resources. My private bloom (private because I was yet too lazy to finish it) only requires a 5-13 tap filter for downscaling, 9 for up scaling and for N textures requires 2N passes, result is silky smooth. Performance wise above the SEUS way.

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

  • luluco250
  • Topic Author
More
6 years 2 weeks ago #4 by luluco250 Replied by luluco250 on topic How would you prefer a bloom effect?

Marty McFly wrote: Actually, there's a compromise that doesn't take too much resources. My private bloom (private because I was yet too lazy to finish it) only requires a 5-13 tap filter for downscaling, 9 for up scaling and for N textures requires 2N passes, result is silky smooth. Performance wise above the SEUS way.


I usually don't even bother blurring when upsampling because it tends to be pretty heavy. And yeah maybe the SEUS way should be used only in cases of necessity.

Also because of how ReShade can't parse expressions in technique passes that means every iteration of a pass, with slightly alterations like scale has to have a shader explicitly written for it. Though macros kinda help.

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

  • Androll
More
6 years 2 weeks ago #5 by Androll Replied by Androll on topic How would you prefer a bloom effect?
Sorry for offtopic, but if you still working on MagicBloom shader, can you add a depth mask of some kind to it, so we can get bloom only on the sky/close objects?

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

  • luluco250
  • Topic Author
More
6 years 2 weeks ago - 6 years 2 weeks ago #6 by luluco250 Replied by luluco250 on topic How would you prefer a bloom effect?

Androll wrote: Sorry for offtopic, but if you still working on MagicBloom shader, can you add a depth mask of some kind to it, so we can get bloom only on the sky/close objects?


Feel free to make requests here, but I have to ask why would you want an effect like that? The sky is actually the most distant object, so that would require an arbitrary check to see if the distance is infinite while also reducing brightness of distant objects that aren't at sky distance, which might not work well with some games.

Something like this could work:
float z = ReShade::GetLinearizedDepth(uv);
bloom *= (z < sky_z) ? z : 1.0;
// Could be optimized to this (not sure, would need to test it):
// bloom *= 1.0 - (1.0 - z) * step(sky_z, z);

Something I've tinkered with before was make distant objects arbitrarily brighter, which gave a neat HDRish effect, though inverse tonemapping usually takes care of that well enough.
Last edit: 6 years 2 weeks ago by luluco250.

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

  • Androll
More
6 years 2 weeks ago - 6 years 2 weeks ago #7 by Androll Replied by Androll on topic How would you prefer a bloom effect?

Feel free to make requests here, but I have to ask why would you want an effect like that?


Because many games are over brightened / over saturated (like gta iv) and standard threshold-only controlled bloom is not enough to make them look good. For now i use shader and custom code from here:

reshade.me/forum/shader-presentation/254...3-yar?start=40#19273

But over time i've encountered many problems with it, and i'm looking for something new and "proper". English is not my primary language, so i have some hard time to explain what's on my mind. Just look at example screenshots below.

ON:
Warning: Spoiler!

OFF:
Warning: Spoiler!


Notice that no other bright spots besides sky produce bloom. Without depth check this kind of stuff is impossible to achieve.
Last edit: 6 years 2 weeks ago by Androll.

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

  • luluco250
  • Topic Author
More
6 years 1 week ago - 6 years 1 week ago #8 by luluco250 Replied by luluco250 on topic How would you prefer a bloom effect?
Tbh I kinda like the bright spot on that building as it's more realistic, overbright skies aren't realistic at all, but it can be done.

Maybe an option to have depth affect the bloom brightness, either positively or negatively with the option to exclude the sky.

Also, maybe you haven't seen what inverse tonemapping looks like, so try this: github.com/luluco250/FXShaders/blob/mast...aders/MagicBloom2.fx

Yeah it's v2 but the v3 file in the repository has a bug which I can't update right now, though @matsilagi has the fixed version so you could ask him for it.

Inverse tonemapping fixes precisely the problem where things that don't look too bright still get way too much influence on the amount of bloom on-screen.
Last edit: 6 years 1 week ago by luluco250.
The following user(s) said Thank You: SandyCheeks

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

  • Androll
More
6 years 1 week ago - 6 years 1 week ago #9 by Androll Replied by Androll on topic How would you prefer a bloom effect?
Agree, but that was just an example shot. There are many places and times in this game (and many many more games) where brightness go crazy and things like lampposts illumination on the ground, white floors or too strong specular reflections blooms everything around, but billboards, neons, direct lights and even sun don't.

Depth approach solves it all for me, because all i need is nice hazy bloom from the sky in day time only. If inverse tone-mapping can do this, then please tell me more about and how to use it.
Last edit: 6 years 1 week ago by Androll.

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

  • Chavolatra
More
6 years 1 week ago #10 by Chavolatra Replied by Chavolatra on topic How would you prefer a bloom effect?
Bloom equals GaussianBloom ?

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

  • luluco250
  • Topic Author
More
6 years 1 week ago #11 by luluco250 Replied by luluco250 on topic How would you prefer a bloom effect?

Chavolatra wrote: Bloom equals GaussianBloom ?


I use gauss in blur but on various levels of detail, so you get both very fine, detail bloom as well as big halos around lights, a bit like what AmbientLight did.

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

  • Chavolatra
More
6 years 2 days ago - 6 years 2 days ago #12 by Chavolatra Replied by Chavolatra on topic How would you prefer a bloom effect?

luluco250 wrote:

Chavolatra wrote: Bloom equals GaussianBloom ?


I use gauss in blur but on various levels of detail, so you get both very fine, detail bloom as well as big halos around lights, a bit like what AmbientLight did.



but gaussianbloom have can saturation and choose color of bloom




In this preset i used blue gaussian bloom with you magic bloom 2 and i have good combination
Last edit: 6 years 2 days ago by Chavolatra.

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.