emitterFalloff
How light spilling from an emitter dims with distance, with a long realistic tail.
emitterFalloff(d: Expr, opts: {radius: Expr | number; power: Expr | number}): Expr
Import light from shaders/std and use light.emitterFalloff.
Returns 1 at the emitter, softened over radius, then fading like real light. d and radius share a unit (usually aspect-corrected uv). power 1 fades like a line of light, power 2 like a point. Use it where glowPoint looks too much like a soft blob.
Parameters
| Name | Type | Notes |
|---|---|---|
d | Expr | |
opts | {radius: Expr | number; power: Expr | number} |
Example
const spill = emitterFalloff(frame.member('x'), {radius: p('radius'), power: 2})