Shaders [Solved] Bloom effect!

N

Norea

Guest
Hi guys, I'm looking for a way to create the bloom effect in game maker studio 2.
Not being at all expert in shader programming for GM, and having found nothing looking on Google, I ask you if there is a way to get a bloom effect on GM2, and if you would be so kind as to give me an example of how I can achieve that.

This is an example of the desired effect:

Thank you!
 
N

Norea

Guest
Hi lolslayer! Thank you for your replay, i'll check the videos you linked me and i'll study the contents even if they're about blur and not bloom.
The real effect that i want to achieve is that, maybe i can help being more precise:

 
Last edited by a moderator:
@Norea: bloom is an effect built on blur. Watch @The Reverend's videos on blur, and you might be able to figure out bloom on your own. The videos are fantastic. Failing that, they're a continuing series. From what I understand, The Reverend is covering bloom soon (even next, maybe?) in his series. His blur videos should probably be watched first either way, though. They've been building up for the last few videos.

Give his videos a watch - chances are you'll feel like a shader pro after a few, haha! I've been going through them myself as a beginner in shaders, and they've helped me a lot. They're extremely thorough and start from the very basics! =)
 
Last edited:
The Reverend is covering bloom soon (even next, maybe?) in his series.
Soonish :)

Next is improving performance with scaling, then hardcoded blurs, then a repetition video and after that blooming in 1 or 2 videos.
Since I cant keep up with the weekly intervals anymore at the moment due to work and helping out in another project we'll start blooming in probably 3 weeks only.

But if you want to create a bloom from a blur before that it's basically this:
  1. Draw the appSrf in a post processing shader to another surface (=bloom surface) drawing everything black that's darker than a given threshold uniform. With a high threshold only very bright pixels are going to be drawn to the bloom surface.
  2. Blur the bloom surface. The blur size will determine the bloom size.
  3. Draw the application surface by a shader using the bloom surface as second texture. Inside the shader you can add the colours of both the appSrf and the bloom surface. Mix the original appSrf colour with the summed colour and use a second uniform as mix amount to determine the strength of the bloom.
It gets a bit more complicated when you don't want to bloom the application surface. That's why I'm thinking of making two videos.
 
Last edited:
Next is improving performance with scaling, then hardcoded blurs, then a repetition video and after that blooming in 1 or 2 videos.
Ah, sounds good. =)
Since I cant keep up with the weekly intervals anymore at the moment due to work and helping out in another project we'll start blooming in probably 3 weeks only.
Yeah, you've been doing a crazy amount of work per week lately. Making these videos along with the base projects must be time consuming. When I looked back through your channel's history, I was like "holy 💩💩💩💩, once a week, really?!", hahah! I was expecting once every two or three weeks per video! It's cool if you take awhile to get to bloom, too - I already mentioned it on youtube (HidejiCO), but I'm actually excited to try tackling bloom myself now, anyway. I'll see what I can do this week, and then just watch your bloom video whenever it comes out to see the (probably better) solution you come up with. These videos really are teaching me the nuts and bolts of shaders, so I'm feeling pretty confident in trying my own soon! =D

I also want to tackle bokeh blurring and the SNES' famous pixelazation blurring...I don't know if you're familiar with it, but the screen basically turns into bigger and bigger square chunks. It's basically an extremely sharp blur. I thought it'd happen with a big enough kernel with the basic cubic-esque first blur you did, but that ended up being smooth still, even though we took samples from a square. I'll think about it after I try bloom. Excited to try problem solving a bit, hahah. Thanks for the tips on getting started with bloom, too! =)
 
N

Norea

Guest
Thank you all for your advice.
At this point I can only wait for the lessons on the bloom while I study the blur as a starting point. Not having other ways to understand how to implement the bloom, the post can be closed.
See you soon!
 

Carloskhard

Member
Thank you all for your advice.
At this point I can only wait for the lessons on the bloom while I study the blur as a starting point. Not having other ways to understand how to implement the bloom, the post can be closed.
See you soon!
I made some research since I'm making a bloom shader that works with alphas and found this very helpful.
I hope you find it too, here you have: https://xorshaders.weebly.com/tutorials/blur-shaders-5-part-2
 
Top