Debugging meshlets

This commit is contained in:
Dynamitos
2024-04-08 20:51:28 +02:00
parent fc277c4d9a
commit fdb43626bb
4 changed files with 10 additions and 12 deletions
+2 -2
View File
@@ -164,7 +164,7 @@ void VertexData::loadMesh(MeshId id, Array<uint32> loadedIndices, Array<Meshlet>
primitiveIndices.resize(primitiveOffset + (m.numPrimitives * 3));
std::memcpy(primitiveIndices.data() + primitiveOffset, m.primitiveLayout, m.numPrimitives * 3 * sizeof(uint8));
meshlets.add(MeshletDescription{
.bounding = m.boundingBox,//.toSphere(),
.bounding = m.boundingBox.toSphere(),
.vertexCount = m.numVertices,
.primitiveCount = m.numPrimitives,
.vertexOffset = vertexOffset,
@@ -173,7 +173,7 @@ void VertexData::loadMesh(MeshId id, Array<uint32> loadedIndices, Array<Meshlet>
});
}
meshData[id].add(MeshData{
.bounding = meshAABB,//.toSphere(),
.bounding = meshAABB.toSphere(),
.numMeshlets = numMeshlets,
.meshletOffset = meshletOffset,
.indicesOffset = (uint32)meshOffsets[id],
+2 -2
View File
@@ -32,7 +32,7 @@ public:
};
struct MeshData
{
AABB bounding;
BoundingSphere bounding;
uint32 numMeshlets = 0;
uint32 meshletOffset = 0;
uint32 firstIndex = 0;
@@ -85,7 +85,7 @@ protected:
VertexData();
struct MeshletDescription
{
AABB bounding;
BoundingSphere bounding;
uint32_t vertexCount;
uint32_t primitiveCount;
uint32_t vertexOffset;