Skip to content

Commit 3f1098b

Browse files
committed
Enable meshopt_optimizeMeshlet from latest meshoptimizer
This increases rasterization performance on NV GPUs.
1 parent 095c188 commit 3f1098b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/niagara.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ size_t appendMeshlets(Geometry& result, const std::vector<Vertex>& vertices, con
200200
// note: we can append meshlet_vertices & meshlet_triangles buffers more or less directly with small changes in Meshlet struct, but for now keep the GPU side layout flexible and separate
201201
for (auto& meshlet : meshlets)
202202
{
203+
meshopt_optimizeMeshlet(&meshlet_vertices[meshlet.vertex_offset], &meshlet_triangles[meshlet.triangle_offset], meshlet.triangle_count, meshlet.vertex_count);
204+
203205
size_t dataOffset = result.meshletdata.size();
204206

205207
for (unsigned int i = 0; i < meshlet.vertex_count; ++i)

0 commit comments

Comments
 (0)