File: VelocityNode.md | Updated: 11/15/2025
A node for representing motion or velocity vectors. Foundation for advanced post processing effects like motion blur or TRAA.
The node keeps track of the model, view and projection matrices of the previous frame and uses them to compute offsets in NDC space. These offsets represent the final velocity.
Constructs a new vertex color node.
Uniform node representing the previous view matrix.
Default is null.
Uniform node representing the previous model matrix in world space.
Default is null.
Uniform node representing the previous projection matrix.
Default is null.
The current projection matrix.
Default is null.
Overwritten since velocity nodes save data after the update.
Default is 'object'.
Overrides: TempNode#updateAfterType
Overwritten since velocity nodes are updated per object.
Default is 'object'.
Overrides: TempNode#updateType
Sets the given projection matrix.
projectionMatrix | The projection matrix to set.
---|---
Implements the velocity computation based on the previous and current vertex data.
builder | A reference to the current node builder.
---|---
Overrides: TempNode#setup
Returns: The motion vector.
Updates velocity specific uniforms.
frame | A reference to the current node frame.
---|---
Overrides: TempNode#update
Overwritten to updated velocity specific uniforms.
frame | A reference to the current node frame.
---|---
Overrides: TempNode#updateAfter