MaterialBuiltin class final

A function the language knows, its type rule and how to compute it.

One table, read by the emitter and by the evaluator. A builtin that existed on one side and not the other is the exact failure this whole row is against, so neither side has its own list: the emitter takes glsl and the software backend takes apply, from the same const instance.

Properties

apply → List<double> Function(List<List<double>> arguments)
The value, given each argument's components. Arguments are already broadcast to a common width when componentWise is set, so an implementation here never has to think about mix(vec3, vec3, float).
final
arity → int
final
componentWise → bool
Whether a float argument beside a vector one is spread across it — clamp(v, 0.0, 1.0) and mix(a, b, t). False for the ones that collapse a vector to a number, where a float argument means something else.
final
glsl → String
The GLSL name, which is the same word for all of these — the language's vocabulary is GLSL's on purpose, so that an author who knows one knows the other and the emitted shader reads like the source.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
final
resultComponents → int?
Fixed for the collapsing ones, and null when the result is as wide as the widest argument.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

byName(String name) → MaterialBuiltin?