Open 3D Engine Meshlets Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::Meshlets::MeshletDescriptor Struct Reference

Public Attributes

uint32_t vertexOffset
 
uint32_t triangleOffset
 
uint32_t vertexCount
 
uint32_t triangleCount
 

Member Data Documentation

◆ triangleOffset

uint32_t AZ::Meshlets::MeshletDescriptor::triangleOffset

Offset into the global meshlets triangleIndices array represented as: std::vector<uint8_t> triangleIndices; triangleIndices = { {meshlet 1 local indices group}, ... { meshlet n} } The local indices are an 8 bits index that can represent up to 256 entries.

◆ vertexCount

uint32_t AZ::Meshlets::MeshletDescriptor::vertexCount

Finding a vertex within the meshlet is done like that: triangleOffset = currentMeshlet.triangleOffset + meshletTrIndex * 3; localIndex_i = meshletTriangles[triangleOffset + i]; // i = triangle vertex index 0..2 vertexIndex_i = indirectIndices[currentMeshlet.vertexOffset + localIndex_i]; Amount of vertices and triangle for the meshlet - based on this the arrays indirectIndices and triangleIndices are created per meshlet.

◆ vertexOffset

uint32_t AZ::Meshlets::MeshletDescriptor::vertexOffset

Offset into the indirect indices array representing the global index of all the meshlet vertices. The Indirect vertices array is built as follows: std::vector<uint32_t> indirectIndices; indirectIndices = { { meshlet 1 vertex indices }, { meshlet 2 }, .. { meshlet n} }


The documentation for this struct was generated from the following file: