MaterialParameter class final

One declared parameter: a name, a type and the value a variant that says nothing about it gets.

A compile-time constant. What gfx-84n asks the toolchain to generate is "the entry points, the variants and the binding metadata", and a variant is a set of parameter values compiled into its own entry point.

What this is not is the only way a value could reach the shader, and an earlier version of this comment said it was. It claimed a parameter that changed per frame would need a new uniform block per material, which the engine could not have. The engine already has one: Material.parameters is bound as MaterialParams to the fragment stage, and since gfx-86n to a vertex stage the material brought as well. A runtime parameter in this language would be a member of that block; it is not written, and the reason is scope rather than impossibility.

Constructors

MaterialParameter(String name, MaterialType type, List<double> defaultValue)
const

Properties

defaultValue → List<double>
As many numbers as type has components.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → MaterialType
final

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