materialBuiltins top-level constant

List<ExpressionBuiltin> const materialBuiltins

The builtins a material may call, the sixteen every version so far has: dot, length, normalize, mix, clamp, smoothstep, step, pow, min, max, abs, sqrt, floor, fract, sin and cos.

Fewer than the expression language has, because each one is also a word every backend's shading language must have under the same name; exp and atan2 join when a version of the material language says so. A name outside this list stays free for a let, as it always was.

Implementation

const List<ExpressionBuiltin> materialBuiltins = <ExpressionBuiltin>[
  ExpressionBuiltin.dot,
  ExpressionBuiltin.length,
  ExpressionBuiltin.normalize,
  ExpressionBuiltin.mix,
  ExpressionBuiltin.clamp,
  ExpressionBuiltin.smoothstep,
  ExpressionBuiltin.step,
  ExpressionBuiltin.pow,
  ExpressionBuiltin.min,
  ExpressionBuiltin.max,
  ExpressionBuiltin.abs,
  ExpressionBuiltin.sqrt,
  ExpressionBuiltin.floor,
  ExpressionBuiltin.fract,
  ExpressionBuiltin.sin,
  ExpressionBuiltin.cos,
];