exp

e raised to the value.

exp(x: Val): Expr

Import math from shaders/std and use math.exp.

With a negative argument it is the classic smooth falloff.

Parameters

NameTypeNotes
xVal

Example

const glow = exp(neg(mul(dist, params.uniforms.falloff)))

See also

  • exp2 — 2 raised to the value.
  • log — The natural logarithm of a value.
  • gaussBell — A bell curve: 1 at zero, falling toward 0 on both sides.

Used by

Aurora, Chrome, Goo, Heatmap, Hologram, MeshGradient, Prism, StudioBackground