[Disclaimer: I'm a hobbyist, not well-read in computer graphics techniques. I may be unfamiliar with common terminology or methods.]
It's possible to explain and reproduce this effect entirely in a “physically-based” manner, simulating the imperfections of physical objects:
- Many objects do not emit or reflect single wavelengths of light, but some spectrum, even if one wavelength dominates.
- Light sensors, whether they are cameras or the human eye, do not have perfect RGB color filters which reject all light outside of non-overlapping bands.
These two effects combined mean that if we make an object bright enough, well past the point of “overexposing” the image, all colors will become perceptually white. All you need to do to implement this is:
- Specify the monochromatic color of your glow such that none of its color channels are exactly zero.
- While you're doing your floating-point color calculations in your fragment shader, multiply your glow by a number much greater than 1, causing clipping in the final output image.
A potential disadvantage of this technique is that, if the hue of the glow is not one of the six primary or secondary colors, then there will be a hue shift in the segment between where one color channel saturates and two do; it'll shift some amount towards cyan/magenta/yellow before proceeding to white. This is not unrealistic, but it might be unaesthetic.
Even if there is not a hue shift, the points where individual color channels saturate might be noticeable due to the sharp change in the spatial derivative; this could be improved by introducing a “soft clipping” nonlinearity that slows down the approach to the maximum value of each channel (which is a form of global tone mapping).
As an example of the results of this strategy, here is a simple simulation of a CRT oscilloscope trace that I programmed. The algorithm is:
Draw many dim 1-pixel points overlaid with additive blending.
(It would be more efficient and precise to use a line with variable brightness, but throwing lots of points at the problem was easy to implement, though it produces artifacts such as dotted lines which are visible in this example.)
Multiply by (R=0.1 G=1.0 B=0.5) × a configurable brightness parameter.
Notice that the dark areas (vertical lines) are mostly green and the bright areas (horizontal lines and peaks, where the simulated beam moves slower) have a white core.