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

NameTypeNotes
dExpr
opts{radius: Expr | number; power: Expr | number}

Example

const spill = emitterFalloff(frame.member('x'), {radius: p('radius'), power: 2})

See also

  • glowPoint — A soft glow at the center of a radial frame with no hard edge.
  • glowSpot — A soft oval glow over an offset you have already scaled, the core of a bloom or a glare.