MaterialVertexStage class final

A material's vertex block as the software backend's vertex stage — version 2: the engine's mesh stage, or its skinned one, and then the block, as the emitted <name>Vertex and <name>VertexSkinned run it.

What the block reads is taken back out of what the engine's stage wrote, rather than the engine's arithmetic written a second time: the mesh-space position and normal are the world ones through the inverse of the model transform, which is the skinned pose's for a skinned draw, as the GLSL has it.

Constructors

MaterialVertexStage(MaterialProgram program, {bool skinned = false, bool instanced = false, bool lightmapped = false})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
instanced → bool
Whether this is the instanced half — version 3: the block runs on the vertex after the instance's transform, and reads its four numbers.
final
lightmapped → bool
Whether this is the lightmapped half — version 3: color reads white, the attribute holding the lightmap's coordinate.
final
program → MaterialProgram
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
skinned → bool
Whether this is the skinned half.
final
varyingCount → int
How many floats of varying this stage writes, so the rasteriser knows how much to interpolate.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(Float32List a, ShaderBindings bindings, Float32List out) → Vector4
Reads attributes — the vertex, as the engine laid it out — and writes a clip-space position plus varyings.
runAt(int vertexIndex, int instanceIndex, Float32List a, ShaderBindings bindings, Float32List out) → Vector4
The same as CpuVertexShader.run, plus the vertex's and the instance's own indices.
toString() → String
A string representation of this object.
inherited

Operators

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