View Full Version : Bloom effect

02-17-2011, 06:33 AM

im wondering what the best method is for creating bloom effects.

at the moment Iam using a 2nd FBO to redraw the entire scene and making the objects that don't glow transparent. then use vertical and horizontal blurs and get the texture and overlay this on my scene.

but this has slowed my fps down because i am rendering everything twice. :sorrow:

Is there a better way of doing this so that objects are only rendered once?
or else putting the FBO in a different thread but i don't know if thats possible or if it would improve peformance.

any ideas?

02-17-2011, 01:14 PM
I don't know what professionals would advice, but for my little projects I usually do the same as you. But rendering the second image every two or three frames. This assumes that there are not many too differences between frames.

02-17-2011, 03:48 PM
Pretty good review here:
HDR (http://www.microsoft.com/downloads/en/details.aspx?FamilyId=995B221D-6BBD-4731-AC82-D9524237D486&displaylang=en)

Basically you render normally to a framebuffer texture.
Then start your postprocessing steps:
1) Threshold and reduce.
2) reduce.
3) reduce
4) reduce
5) blur and upscale
6) blur, combine and upscale
7) blur combine and upscale
8) add back to orignal image.

:D (very roughly)

Nice thing about reducing is that a single blur effects more of the scene. Faster than bluring the orignal image many times.

Here is some sensory overload as an example: <object width="425" height="350"> <param name="movie" value="http://www.youtube.com/v/pmMmjMoXpgk"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/pmMmjMoXpgk" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"> </embed></object>
Probably good to do hdr at the same time as bloom.

Should slow things down, but no need to render the scene twice.