I'm working on a game and engine as I go under OpenGL.

I've had a bloom effect in place for a while that works as a post-procesing effect on the entire screen. It's been fine up until now.

I have an object that is made up of a few meshes, and one of these meshes is mostly white. The result is it blooms like crazy, but I really don't want it to.

The only way around it I can see is that the objects I do want to have bloom would need to be rendered to a bloom-framebuffer from which I can bloom (and store the depths) to then mix back in with the rest of my scene.

Is this the only way to go about it? It seems like a lot of work to simply isolate something from a screen-wide affect.


Usually bloom is done with HDR rendering where you use a floating point (usually 16 bits per channel) texture for rendering to.

  • Things that are brighter than 1.0 get bloom applied.
  • Things that are 1.0 or less don't get any bloom.

You render everything to the same texture, and remove anything that's not bright enough to bloom when you start processing the bloom post effect. That means you can have a white thing that doesn't bloom by rendering it as RGB(1.0, 1.0, 1.0) and one that does by using say RGB(2.0, 2.0, 2.0).



  • \$\begingroup\$ Can you help me with a luminance threshold shader that isolates high luminance values above 1.0? What I'm using now gives weird results when I try to use a threshold value above 1.0. \$\endgroup\$ – NeomerArcana May 18 '15 at 0:14
  • \$\begingroup\$ There's a few options for the bright pass shader at gamedev.net/topic/632644-best-way-to-filter-for-a-bloom-effect \$\endgroup\$ – Adam May 19 '15 at 20:22

I use MRT rendering for this; I render everything into both a diffuse map and a glow map. I then blur the glow map into a bloom-like effect, and add it back on top of the diffuse map as a post-processing effect.

This way I can make objects that glow (by drawing their diffuse color into both the diffuse and the glow map), objects that don't glow (by drawing black into the glow map), translucent objects that partially obscure the glow of any glowing objects which are visible through them (drawing partly transparent black into the glow map), and even objects which glow a different color than their diffuse (by drawing different colors into the two buffers).

It's a pretty simple system that gives a lot of power and flexibility, I find.

  • \$\begingroup\$ Oh that's a good idea. I will combine it with the other answer, gives me options to bloom smaller values in some instances. \$\endgroup\$ – NeomerArcana May 19 '15 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.