ScriptableNodeResources
A CPU-side registry used for managing and looking up custom TSL function nodes, thereby extending TSL's capabilities.
Core Advantages
Its core value is transforming TSL from a closed toolset into an open, extensible platform. It decouples the core builder from user code and allows shader logic to be managed as data, which is crucial for developing visual editors or dynamic material systems.
Common Uses
Creating shared TSL function libraries for individuals or teams.
Providing the list of available nodes for a visual node editor.
Implementing data-driven dynamic materials (e.g., switching effects in a game).
Packaging and publishing reusable TSL feature plugins.
How to adjust
Adjusting it is like adding or swapping tools in the TSL toolbox, changing its capabilities. For example, by replacing an old 'myNoise' implementation with an advanced Simplex noise version and recompiling the material, you can instantly change a model's surface texture from a harsh, blocky pattern to a smooth, organic one.
Code Examples
1// Register a custom TSL function node
2ScriptableNodeResources.add( 'myDither', myDitherFunctionNode );