File: VaryingNode.md | Updated: 11/15/2025
Class for representing shader varyings as nodes. Varyings are create from existing nodes like the following:
const positionLocal = positionGeometry.toVarying( 'vPositionLocal' );
Constructs a new varying node.
node | The node for which a varying should be created.
---|---
name | The name of the varying in the shader. Default is null.
This flag is used for global cache.
Default is true.
Overrides: Node#global
The interpolation sampling type of varying data.
Default is null.
The interpolation type of the varying data.
Default is null.
This flag can be used for type testing.
Default is true.
The name of the varying in the shader. If no name is defined, the node system auto-generates one.
Default is null.
Overrides: Node#name
The node for which a varying should be created.
Defines the interpolation type of the varying.
type | The interpolation type.
---|---
sampling | The interpolation sampling type Default is null.
Returns: A reference to this node.
This method performs the setup of a varying node with the current node builder.
builder | The current node builder.
---|---
Returns: The node varying from the node builder.