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

16 lines
527 B
C++
Raw Normal View History

2023-12-23 18:26:54 +01:00
#pragma once
#include "Math/AABB.h"
#include "Graphics/Enums.h"
namespace Seele
{
struct Meshlet
{
AABB boundingBox;
2024-04-06 08:29:15 +02:00
uint16 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-06 08:29:15 +02:00
static void build(const Array<Vector>& positions, const Array<uint16>& indices, Array<Meshlet>& meshlets);
2023-12-23 18:26:54 +01:00
};
} // namespace Seele