Capítulo 778 de 859

Chapter 778: StorageInstancedBufferAttribute

Core Idea

This special type of instanced buffer attribute is intended for compute shaders. In earlier three.js versions it was only possible to update attribute data on the CPU via JavaScript and then upload the data to the GPU. With the new material system and renderer it is now possible to use compute shaders to compute the data for an attribute more efficiently on the GPU.

The idea is to create an instance of this class and provide it as an input to StorageBufferNode.

Note: This type of buffer attribute can only be used with WebGPURenderer.

Key Concepts

  • isStorageInstancedBufferAttribute : boolean (readonly): This flag can be used for type testing.

Reference Tables

Constructor

Signature
`new StorageInstancedBufferAttribute( count : number

Properties

PropertyDescription
.isStorageInstancedBufferAttribute : boolean (readonly)This flag can be used for type testing.

Key Takeaways

  1. StorageInstancedBufferAttribute extends: BufferAttribute → InstancedBufferAttribute
  2. Most relevant properties: isStorageInstancedBufferAttribute.

Connects To