Debugging meshlets
This commit is contained in:
@@ -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],
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user