Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Bloom

This thread is locked; no one can reply to it. rss feed Print
Bloom
dthompson
Member #5,749
April 2005
avatar

I did a quick google for this on the forums, but the last threads I found were pretty old. I then searched for bloom tutorials; most talk about blurring the pixels in colour buffers (which I guess we'd normally just call ALLEGRO_BITMAPs).

Given that this is a relatively common effect these days, I'd be interested to know how the modern Allegro developer - and I'm hoping this term applies to some of you ;) - goes about doing this. Would then be good to get this written up in a tutorial on the wiki.

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

dthompson
Member #5,749
April 2005
avatar

it won't compile :(

{"name":"shader.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/5\/4507b76a762e8f5d3fd347cd8e05d519.png","w":450,"h":447,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/5\/4507b76a762e8f5d3fd347cd8e05d519"}shader.png

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

dthompson
Member #5,749
April 2005
avatar

Nah, no specific formula - but the general idea is "particularly bright things start to glow".

Wikipedia said:

The effect produces fringes (or feathers) of light extending from the borders of bright areas in an image, contributing to the illusion of an extremely bright light overwhelming the camera or eye capturing the scene

You can see it around the edges of the silhouetted building here:

{"name":"5knW2iR.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/b\/7b71ac07d9e0e1e56589c9e22d06ecda.jpg","w":2048,"h":1152,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/b\/7b71ac07d9e0e1e56589c9e22d06ecda"}5knW2iR.jpg

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

dthompson
Member #5,749
April 2005
avatar

Nope, but I'm not personally looking to use bloom for 3D anyway :P if anything, I just wanted it for a nice effect when my game is either paused or when the level completes. I'm just wondering if anyone happens to have implemented bloom with Allegro and is willing to share their code, mainly because I am a lazy programmer and don't want to do original research.

______________________________________________________
Website. It was freakdesign.bafsoft.net.
This isn't a game!

jmasterx
Member #11,410
October 2009

Go to: