This effect is called light bloom. Its algorithm is usually a variation of the following:
- Render your scene (preferably in high dynamic range) to texture.
- Make a thresholding pass to another texture. I.e. pixels whose brightness is below a certain (configurable) threshold are are turned down to black.
- Downsample and blur the thresholded pixels. Usually, this is done in several "octaves", i.e. rendering a Gaussian blur with a small kernel to progressively smaller render targets: from full resolution to half resolution, from half to quarter etc.
- Composite the downsampled octaves back onto the scene image.
Both the number of octaves used and the Gaussian blur kernel size affect the end result in terms of visual quality and performance, so you may need to do trade-offs.
In other words, the glow effect that you seek is usually simply the original scene image, but thresholded and blurred, superimposed back onto the scene image.
AddBloom()here is a good starting point. However, for a super-simple technique that involves an optional "lens dirt" effect, you could check out the post-processing library I wrote back at university: the CPU side (lines 222-241) and the bright pass and compositing shaders. Apologies for TinyURL, comment was too long. – IneQuation Nov 04 '16 at 09:09