NodeUpdateType
Provides a set of declarative update frequency constants (e.g., per-frame, per-object) to optimize shader node computations and avoid unnecessary performance overhead.
Core Advantages
Its core value is performance optimization. It uses a declarative API (`.setUpdateType()`) to abstract complex update logic away from the application layer, allowing developers to precisely control a node's computation frequency, significantly reducing CPU load and improving rendering performance.
Common Uses
NONE: For static values that never change (e.g., a fixed color).
FRAME: For globally synchronized animations (e.g., water waves, time-based effects).
RENDER: For camera-dependent effects (e.g., Fresnel effect), especially important in multi-camera setups.
OBJECT: For effects that are unique to each object and depend on its properties (e.g., world-position-based effects).
How to adjust
This node is a constant and cannot be adjusted. However, choosing a different update type for a dynamic node completely changes its animation behavior. For example, with a scan-in effect, `FRAME` makes all objects animate in sync; `OBJECT` gives each object an independent animation starting from its own lifecycle; `NONE` disables the animation entirely.
Code Examples
1myNode.setUpdateType( NodeUpdateType.OBJECT ); // Makes the node update independently for each object