Need help with masking bloom effects

More
2 years 11 months ago - 2 years 11 months ago #1 by klotim
Need help with masking bloom effects was created by klotim
Hey!
Im looking for some code guru that can help me with masking bloom so it wont affect hud. I'm aware of UI mask and it works but the bloom is still applied so the "aura" is outside the mask. I would do it myself if I knew how to do it.

Anyone that would like to help please?

You can see it here:

As you can see, the UI on the bottom is masked, but the bloom is still processed.
Last edit: 2 years 11 months ago by klotim.

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

More
2 years 11 months ago - 2 years 11 months ago #2 by klotim
Replied by klotim on topic Need help with masking bloom effects
There is no bloom shaders that uses ui mask right? It's been asked soooo many times already.
Last edit: 2 years 11 months ago by klotim.

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

More
2 years 11 months ago - 2 years 11 months ago #3 by Daodan
Replied by Daodan on topic Need help with masking bloom effects
Just wrote a small generic shader that should do the trick. This is more of a workaround than a solution; masking in the bloom shader itself would definitely be better. As it is unknowable what kind of math the bloom shader uses to apply the bloom the mask should only be black and white (no gradients), otherwise it looks bad. Just place the PreBloom technique right before the bloom and the PostBloom technique right after it.

Here the left part of the bar is masked the right is not:


Warning: Spoiler!
Last edit: 2 years 11 months ago by Daodan.
The following user(s) said Thank You: klotim

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

More
2 years 11 months ago #4 by klotim
Replied by klotim on topic Need help with masking bloom effects
wow it works! Thank you!!!
You should submit this one!

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

More
2 years 11 months ago #5 by crosire
Replied by crosire on topic Need help with masking bloom effects

There are two pre-bloom techniques because rendering to a texture and the backbuffer simultaneously is not possible.

You can use two passes in the same technique instead of two techniques though.

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

More
2 years 11 months ago #6 by Daodan
Replied by Daodan on topic Need help with masking bloom effects

You can use two passes in the same technique instead of two techniques though.


Oh, right! I don't know why I haven't done that... embarrassing...

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

More
11 months 3 weeks ago - 11 months 3 weeks ago #7 by Edgarska
Replied by Edgarska on topic Need help with masking bloom effects
Edit: I screwed up, it is working still.
Last edit: 11 months 3 weeks ago by Edgarska. Reason: Mistake

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