Threshold: what glows
0 = black, 255 = white, rounded to steps of 5. Lamp brightness 3, strength 0.5, radius 0.2.
Bloom makes very bright pixels glow into their surroundings, like a lamp seen through mist. Three numbers control it (threshold, strength, radius), a brightness trick keeps it on the lights only, and it costs a chain of smaller pictures.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
A showroom's brightest lit paint reaches linear brightness 0.8 and the headlight lens is 5. What threshold would you use, and why not 0?
Write the lines that put only the headlight lens on layer 1 and test whether an object is on it.
Explain it without notes
Why can bloom pick out a lamp from the other surfaces, and when does that stop working?
How do you cut bloom's cost on a phone?
Console
Nothing logged yet.Expected console output
threshold 0 | beside the lamp: 120 | beside the orange panel: 115 (0 = black, 255 = white)
threshold 0.9 | beside the lamp: 115 | beside the orange panel: 15 (0 = black, 255 = white)
threshold 5 | beside the lamp: 0 | beside the orange panel: 0 (0 = black, 255 = white)