modulate

Multiply light parts drawn in the same frame, such as a mask over a pattern.

modulate(first: LightPart, ...rest: LightPart[]): LightPart

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

Parameters

NameTypeNotes
firstLightPart
...restLightPart[]Optional.

Example

modulate(rayLobes({count: 12, spin: -1, sharpness: 4}), glowPoint({sharpness: 6}), featherMask({radius: p('radius'), feather: 0.4}))

See also

  • withFrame — Evaluate a light part in a frame.
  • additive — Adds lights together, since light from several sources simply sums.

Used by

SunBurst