featherMask

A round mask that is solid inside a radius and fades out at its edge.

featherMask(slots: {radius: ArgSpec; feather: ArgSpec}): LightPart

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

Returns 1 inside, fading to 0 at radius (in the frame's distance unit). feather is the fraction of the radius spent fading: 0 is a hard edge, 1 fades all the way from the center. Multiply it with a pattern in modulate to give a light an outer edge.

Parameters

NameTypeNotes
slots{radius: ArgSpec; feather: ArgSpec}

Example

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

See also

  • glowPoint — A soft glow at the center of a radial frame with no hard edge.
  • modulate — Multiply light parts drawn in the same frame, such as a mask over a pattern.

Used by

SunBurst