Capítulo 508 de 859
Class for representing shader varyings as nodes. Varyings are create from existing nodes like the following:
const positionLocal = positionGeometry.toVarying( 'vPositionLocal' );
Constructor
| Signature |
|---|
new VaryingNode( node : Node, name : string ) |
Properties
| Property | Description |
|---|---|
.global : boolean | This flag is used for global cache. |
.interpolationSampling : string | The interpolation sampling type of varying data. |
.interpolationType : string | The interpolation type of the varying data. |
.isVaryingNode : boolean (readonly) | This flag can be used for type testing. |
.name : string | The name of the varying in the shader. If no name is defined, the node system auto-generates one. |
.node : Node | The node for which a varying should be created. |
Methods
| Method | Description |
|---|---|
.setInterpolation( type : string, sampling : string ) : VaryingNode | Defines the interpolation type of the varying. |
.setupVarying( builder : NodeBuilder ) : NodeVarying | This method performs the setup of a varying node with the current node builder. |