slowDrift
The slow breathing and drifting signals that keep a light leak alive.
slowDrift(slots: {seed: ArgSpec; flicker: ArgSpec}): (clock: Expr, params: GpuFragmentParams) => Expr
Import light from shaders/std and use light.slowDrift.
Call the result with a clock and the params. It returns four numbers: .x is a brightness gain to multiply your light by (1 with flicker at 0, breathing between 0.25 and 1.75 at 1), and the rest are the slow drifts beamBloom and beamStreaks read. Pass the whole value to them as drift. seed re-rolls the pattern.
Parameters
| Name | Type | Notes |
|---|---|---|
slots | {seed: ArgSpec; flicker: ArgSpec} |
Example
const drift = local(slowDrift({seed: p('seed'), flicker: p('flicker')})(animatedTime(params), params), 'leakDrift')
See also
beamBloom— The soft pool of light at the start of a beam, with a wider faint shoulder around it.beamStreaks— Two bright bands crossing a beam further along it, slowly drifting, like light bouncing inside a film camera.beamFrame— The frame of a beam that starts at an anchor prop and points at the canvas center.