flareFrame

The shared frame of a camera lens flare, which every flare* part reads.

flareFrame(slots: {position: PropRef; intensity: ArgSpec; edgeFade: ArgSpec}): LightValue

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

position is the light's position prop. intensity scales the whole flare and edgeFade (0–1) dims it as the light nears the canvas edge. Bind it once with a name and hand the same value to each part, then close the stack with flareComposite.

Parameters

NameTypeNotes
slots{position: PropRef; intensity: ArgSpec; edgeFade: ArgSpec}

Example

const flare = local(flareFrame({position: p('lightPosition'), intensity: p('intensity'), edgeFade: p('edgeFade')})(params), 'flare')

See also

  • flareCore — The bright point at the light itself: a hard pinpoint inside a small soft glow.
  • flareGlare — The broad warm-white wash around the light that lifts contrast near it.
  • flareHalo — The rainbow halo ring of a lens flare, drawn across the canvas from the light.
  • flareStarburst — The star of thin spikes around the light in a lens flare.
  • flareStreak — The horizontal widescreen streak through the light in a lens flare.
  • lensGhost — One ghost disc of a lens flare, the faint circles that line up across from the light.
  • flareComposite — Closes a lens flare: turns the summed flare parts into the color to return from paint.

Used by

LensFlare