beamBloom

The soft pool of light at the start of a beam, with a wider faint shoulder around it.

beamBloom(slots: {spread: ArgSpec}): (frame: Expr, drift: Expr, params: GpuFragmentParams) => Expr

Import light from shaders/std and use light.beamBloom.

Call the result with a beamFrame value, a slowDrift value and the params. It returns vec2(main, shoulder), two 0–1 fields you usually add together. spread is the pool's size in the frame's unit (aspect-corrected uv), at least 0.05.

Parameters

NameTypeNotes
slots{spread: ArgSpec}

Example

const bloom = beamBloom({spread: p('spread')})(frame, drift, params)
const heat = add(mul(bloom.member('x'), 1.25), bloom.member('y'))

See also

  • beamFrame — The frame of a beam that starts at an anchor prop and points at the canvas center.
  • slowDrift — The slow breathing and drifting signals that keep a light leak alive.
  • beamStreaks — Two bright bands crossing a beam further along it, slowly drifting, like light bouncing inside a film camera.

Used by

LightLeak