Capítulo 422 de 859

Chapter 422: IndexNode

Core Idea

This class represents shader indices of different types. The following predefined node objects cover frequent use cases:

  • vertexIndex: The index of a vertex within a mesh.
  • instanceIndex: The index of either a mesh instance or an invocation of a compute shader.
  • drawIndex: The index of a draw call.
  • invocationLocalIndex: The index of a compute invocation within the scope of a workgroup load.
  • invocationSubgroupIndex: The index of a compute invocation within the scope of a subgroup.
  • subgroupIndex: The index of a compute invocation's subgroup within its workgroup.

Key Concepts

  • isIndexNode : boolean (readonly): This flag can be used for type testing.
  • scope : string: The scope of the index node.

Reference Tables

Constructor

Signature
`new IndexNode( scope : 'vertex'

Properties

PropertyDescription
.isIndexNode : boolean (readonly)This flag can be used for type testing.
.scope : stringThe scope of the index node.

Key Takeaways

  1. IndexNode extends: EventDispatcher → Node
  2. Most relevant properties: isIndexNode, scope.

Connects To