rayBands
Bright bands that travel along a coordinate, for aurora curtains or shimmering rays.
rayBands(opts: {
along: Expr
frequency: Expr | number
time: Expr | number
speed: Expr | number
phase?: Expr | number
sharpness: Expr | number
}): Expr
Import light from shaders/std and use light.rayBands.
Returns a 0–1 field. along is the coordinate the bands cross (a uv axis, or a noise-warped one for organic rays), frequency the band count per unit of it, and time × speed how fast they travel. sharpness above 1 narrows the bright bands.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | `{ |
along: Expr
frequency: Expr \| number
time: Expr \| number
speed: Expr \| number
phase?: Expr \| number
sharpness: Expr \| number
}` | |
Example
const rays = rayBands({along: params.ctx.uv.member('x'), frequency: 12, time: animatedTime(params), speed: 0.3, sharpness: 2})
Tip. Add a noise field to
alongbefore passing it and the straight bands turn into curtains.
See also
rayLobes— Soft rays fanning out from the center of a radial frame, turning with the layer's clock.streakBand— One soft band across a single coordinate, peaking atcenter.