flareComposite

Closes a lens flare: turns the summed flare parts into the color to return from paint.

flareComposite(total: Expr, flare: Expr): Expr

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

Pass the additive sum of the parts and the flare frame. The frame's intensity, edge fade and shimmer are applied here, and alpha comes from how bright the flare is.

Parameters

NameTypeNotes
totalExpr
flareExpr

Example

return flareComposite(additive(ghosts, halo, starburst, streak, glare, core), flare)

See also

  • additive — Adds lights together, since light from several sources simply sums.
  • flareFrame — The shared frame of a camera lens flare, which every flare* part reads.

Used by

LensFlare