The Bloom Post Processing Effect

How does the effect work and how can it be implemented in OpenGL?

Christian Behler
4 min readJul 9, 2020

Bloom is a very popular post-processing effect in games. It is based on a real-world phenomenon that is causing bright lights to bleed over into darker areas when seen through a lens. While the physically correct implementation wouldn’t be feasible for real-time graphics, there are a few tricks to simulate it efficiently. The implementation takes a few steps but is generally easy to do. However, bloom has to be used with care. Many games have overused the effect, but when applied correctly it can add beautiful highlights.

Physics

Even a mathematically perfect lens cannot focus light into a single point. Instead, the light is focussed on a small bright area with smaller, less bright concentric rings around it. This pattern is called Airy disk and occurs because of the diffraction of the light within the lens. And as you can imagine, camera lenses are never mathematically perfect which enhances the effect.

Under normal conditions with mostly even lighting, this effect isn’t noticeable. However, when a very intense light source is directly next to a very dark area, the Airy disk is bright enough to spill over. Because of this, the light bleeds into the darkness and there is no clearly defined edge between the two.

The light bleeds onto the ceiling at the top edge of the window where the bright sky and the dark ceiling are directly next to each other, Photo by iam_os on Unsplash

--

--

Christian Behler
Christian Behler

Written by Christian Behler

M. Sc. Computer Science and Physics, Indie Game/Software/Web Developer, Writer, 3D Artist, and too many other interests. https://pingpoli.medium.com/membership

Responses (1)