Skip to content

meshletutils: Add experimental meshopt_extractMeshletIndices#1021

Merged
zeux merged 4 commits intomasterfrom
ml-extract
Feb 20, 2026
Merged

meshletutils: Add experimental meshopt_extractMeshletIndices#1021
zeux merged 4 commits intomasterfrom
ml-extract

Conversation

@zeux
Copy link
Owner

@zeux zeux commented Feb 20, 2026

Given a cluster index buffer (with global vertex references, but limited
to 256 unique values), this function produces meshlet indices (unique
global vertex references and a micro-index buffer). This is somewhat
similar to meshopt_buildMeshletsScan, but more restrictive and much
faster on large vertex counts.

This was previously implemented in demo/clusterlod.h, but it can be
useful in other code and the implementation fits the core library
better.

This contribution is sponsored by Valve.

zeux added 4 commits February 20, 2026 07:38
Given a cluster index buffer (with global vertex references, but limited
to 256 unique values), this function produces meshlet indices (unique
global vertex references and a micro-index buffer). This is somewhat
similar to meshopt_buildMeshletsScan, but more restrictive and much
faster on large vertex counts.

This was previously implemented in demo/clusterlod.h, but it can be
useful in other code and the implementation fits the core library
better.
We still need clodLocalIndices so that clusterlod.h header is
self-contained, but this function is now simply a meshopt wrapper.
For now we don't plan to use this function anywhere in demo/main.cpp but
we do need testing coverage.
Add meshopt_extractMeshletIndices to experimental list.
@zeux zeux merged commit 0d2f132 into master Feb 20, 2026
13 checks passed
@zeux zeux deleted the ml-extract branch February 20, 2026 17:59
@zeux
Copy link
Owner Author

zeux commented Feb 20, 2026

(forgot to mention, but using this function instead of the manual deduplication loop in vk_lod_clusters results in ~1% end to end speedup)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant