Inheritance: EventDispatcher → Node →
This node implements the vertex shader logic which is required when rendering 3D objects via instancing. The code makes sure vertex positions, normals and colors can be modified via instanced data.
Constructs a new instance node.
count
The number of instances.
instanceMatrix
Instanced buffer attribute representing the instance transformations.
instanceColor
Instanced buffer attribute representing the instance colors.
Default is null.
A reference to a buffer that is used by instanceMatrixNode.
A reference to a buffer that is used by instanceColorNode.
The number of instances.
Instanced buffer attribute representing the color of instances.
The node that represents the instance color data.
Default is null.
Instanced buffer attribute representing the transformation of instances.
The node that represents the instance matrix data.
Tracks whether the color data is provided via a storage buffer.
Tracks whether the matrix data is provided via a storage buffer.
The previous instance matrices. Required for computing motion vectors.
Default is null.
The update type is set to frame since an update of instanced buffer data must be checked per frame.
Default is 'frame'.
Overrides: Node#updateType
Computes the transformed/instanced vertex position of the previous frame.
builder
The current node builder.
Returns: The instanced position from the previous frame.
Setups the internal buffers and nodes and assigns the transformed vertex data to predefined node variables for accumulation. That follows the same patterns like with morph and skinning nodes.
builder
The current node builder.
Overrides: Node#setup
Checks if the internal buffers require an update.
frame
The current node frame.
Overrides: Node#update