additive

Adds lights together, since light from several sources simply sums.

additive(first: Expr, ...rest: Expr[]): Expr

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

Parameters

NameTypeNotes
firstExpr
...restExpr[]Optional.

Example

const total = additive(glare, halo, core)

See also

  • modulate — Multiply light parts drawn in the same frame, such as a mask over a pattern.
  • flareComposite — Closes a lens flare: turns the summed flare parts into the color to return from paint.

Used by

LensFlare