Files
Seele/src/Engine/Graphics/Meshlet.h
T

15 lines
534 B
C++
Raw Normal View History

2023-12-23 18:26:54 +01:00
#pragma once
#include "Graphics/Enums.h"
2024-06-09 12:20:04 +02:00
#include "Math/AABB.h"
2023-12-23 18:26:54 +01:00
2024-06-09 12:20:04 +02:00
namespace Seele {
struct Meshlet {
2023-12-23 18:26:54 +01:00
AABB boundingBox;
2024-06-09 12:20:04 +02:00
uint32 uniqueVertices[Gfx::numVerticesPerMeshlet]; // unique vertiex indices in the vertex data
2023-12-23 18:26:54 +01:00
uint8 primitiveLayout[Gfx::numPrimitivesPerMeshlet * 3]; // indices into the uniqueVertices array, only uint8 needed
uint32 numVertices;
uint32 numPrimitives;
2024-04-07 16:33:32 +02:00
static void build(const Array<Vector>& positions, const Array<uint32>& indices, Array<Meshlet>& meshlets);
2023-12-23 18:26:54 +01:00
};
} // namespace Seele