storage
Provides array-like access to large data buffers on the GPU within shaders, supporting massive datasets and flexible indexed access. It is key for advanced effects like GPU particle systems, complex skinning, and General-Purpose GPU (GPGPU) computations.
Core Advantages
Breaks the size limits of traditional uniforms, allowing massive structured data (e.g., states for millions of particles) to be transferred to and accessed by the GPU, and supports read/write operations in compute shaders.
Common Uses
GPU-accelerated particle systems
Complex vertex animation and skinning
General-Purpose Computing (GPGPU), such as physics simulations or AI calculations
How to adjust
The core adjustability of this node lies in modifying the index passed to the `.element()` method. By dynamically calculating the index, different effects can be created from the same dataset. For example, using a time node (`timerLocal`) can create looping animations, while using position coordinates (`positionLocal`) can make the effect vary based on the model's spatial position.
Code Examples
1// Access an element from the buffer using an index (e.g., vertexIndex)
2const element = bufferNode.element( vertexIndex );
3
4// Apply it, for example, to the local position
5positionLocal.add( element );