Skip to content
Lens · TechniqueIntermediate

Bloom

Let light brighter than the screen can show spill into its surroundings, through a blurred copy of only the brightest pixels.

UVScreenScreen / post

Cards

One live example to tweak, learn and copy.

How it works

A camera lens and the eye both scatter a little of every light into the area around it. You never notice it on a gray wall, but around a lamp, a neon sign or the sun the scattered light is bright enough to see: a soft halo that makes the source look brighter than the white of the screen. Bloom fakes that halo, and it is the main reason a renderer keeps colors above 1 at all.

The recipe has three parts:

  1. Bright pass. Keep only the pixels whose brightness is above a threshold, usually around 1, and turn the rest black. Without values above 1 there is nothing to tell a lamp from a white shirt, which is why bloom needs an HDR scene.
  2. Blur. Spread what is left with a wide blur, almost always at half size or smaller, because the halo is soft and a big radius at full size is expensive. Engines chain several sizes and add them up, so the halo has a bright core and a long faint tail.
  3. Composite. Add the blur back onto the original frame, then tone-map, since the sum is brighter still.

Each part is its own pass, with a render target between them, so bloom is the standard example of a post-process chain. Every engine ships one (Godot calls it Glow); writing your own is worth it on the web, where nothing does it for you, or when you need a look the built-in one can’t give.

Further reading