Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 15.3 — Bloom and Glow
3D Web · Example 1 of 2

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.

01

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?

02

Write the lines that put only the headlight lens on layer 1 and test whether an object is on it.

Explain it without notes

01

Why can bloom pick out a lamp from the other surfaces, and when does that stop working?

02

How do you cut bloom's cost on a phone?

Threshold: what glows
Press Run to see the page.
idle

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)