Builtin reference

These pages list every builtin function in easl, with all the signatures each accepts. For an alphabetical list of everything, see the function index.

Notation#

Signatures are written in easl style, (name arg: Type ...): ReturnType, with these conventions for describing overload families:

NotationMeaning
T: scalarT may be f32, i32, or u32
T: integerT may be i32 or u32
T: scalar or boolT may be f32, i32, u32, or bool
(vecN T)any of (vec2 T), (vec3 T), (vec4 T) — i.e. vec2f…vec4u
Ff32 or any of vec2f, vec3f, vec4f, applied element-wise
()the unit type (no return value)

When a signature says a function takes F in several positions, all of those positions take the same type — (pow (vec3f ...) (vec3f ...)) is valid, (pow (vec3f ...) 2.) is not (splat the scalar first: (pow v (vec3f 2.))).

Functions marked associative accept two or more arguments: (+ a b c d) works and expands to nested two-argument calls.

Many functions correspond directly to wgsl builtins; where the name differs it's a mechanical case conversion (inverse-sqrt → inverseSqrt, texture-sample → textureSample).