◆ 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:
- Gems/Meshlets/Code/Source/Meshlets/MeshletsData.h