Welcome, Guest.
Username: Password: Remember me

TOPIC: How would you prefer a bloom effect?

How would you prefer a bloom effect? 3 weeks 2 days ago #1

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 141
  • Thank you received: 91
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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 3 weeks 2 days ago by luluco250.
The administrator has disabled public write access.
The following user(s) said Thank You: Flamex, SandyCheeks

How would you prefer a bloom effect? 3 weeks 2 days ago #2

  • Martigen
  • Martigen's Avatar
  • Offline
  • Posts: 264
  • Thank you received: 56
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 :)
The administrator has disabled public write access.

How would you prefer a bloom effect? 3 weeks 2 days ago #3

  • Marty McFly
  • Marty McFly's Avatar
  • Online
  • We've tried nothing and we're all out of ideas!
  • Posts: 983
  • Thank you received: 980
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.
The administrator has disabled public write access.

How would you prefer a bloom effect? 3 weeks 2 days ago #4

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 141
  • Thank you received: 91
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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
The administrator has disabled public write access.

How would you prefer a bloom effect? 3 weeks 1 day ago #5

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

How would you prefer a bloom effect? 3 weeks 1 day ago #6

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 141
  • Thank you received: 91
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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 3 weeks 1 day ago by luluco250.
The administrator has disabled public write access.

How would you prefer a bloom effect? 3 weeks 1 day ago #7

  • Androll
  • Androll's Avatar
  • Offline
  • Posts: 23
  • Thank you received: 3
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! [ Click to expand ]

OFF:
Warning: Spoiler! [ Click to expand ]


Notice that no other bright spots besides sky produce bloom. Without depth check this kind of stuff is impossible to achieve.
Last Edit: 3 weeks 1 day ago by Androll.
The administrator has disabled public write access.

How would you prefer a bloom effect? 3 weeks 1 day ago #8

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 141
  • Thank you received: 91
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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 3 weeks 1 day ago by luluco250.
The administrator has disabled public write access.
The following user(s) said Thank You: SandyCheeks

How would you prefer a bloom effect? 3 weeks 8 hours ago #9

  • Androll
  • Androll's Avatar
  • Offline
  • Posts: 23
  • Thank you received: 3
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: 3 weeks 8 hours ago by Androll.
The administrator has disabled public write access.

How would you prefer a bloom effect? 2 weeks 4 days ago #10

  • Chavolatra
  • Chavolatra's Avatar
  • Offline
  • Posts: 59
  • Thank you received: 3
Bloom equals GaussianBloom ?
The administrator has disabled public write access.

How would you prefer a bloom effect? 2 weeks 3 days ago #11

  • luluco250
  • luluco250's Avatar
  • Offline
  • Posts: 141
  • Thank you received: 91
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.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
The administrator has disabled public write access.

How would you prefer a bloom effect? 1 week 3 days ago #12

  • Chavolatra
  • Chavolatra's Avatar
  • Offline
  • Posts: 59
  • Thank you received: 3
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: 1 week 3 days ago by Chavolatra.
The administrator has disabled public write access.