parameter
parameter
Defines a named, typed input parameter within a reusable function node (like tslFn), serving as an interface or slot for connecting concrete data nodes.
Core Advantages
Common Uses
Creating reusable custom function nodes (e.g., a cel-shading function)
Defining abstract, stackable material effect layers (e.g., snow, rust)
Defining a clear input interface for complex `tslFn` functions
How to adjust
The effect of adjustment is seen by connecting different input nodes to the parameter when calling the function. For example, replacing a static `uniform(0.5)` node connected to an `effectStrength` parameter with a dynamic `sin(time())` node will transform a static effect into a rhythmic, dynamic pulsing animation.
Code Examples
1// Define a function signature in tslFn using parameter
2.setLayout( {
3 baseColor: parameter( 'vec4', 'baseColor' ),
4 tint: parameter( 'vec4', 'tint' )
5} )