KhronosGroup / KhronosGroup/COLLADA2GLTF

Optimize UINT32 indices generation

Open
#160 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
573
Forks
154
PR merge metrics
No merged PRs in 30d

Description

#159 added support for generating UINT32 indices when primitives exceed the capacity of UINT16. More accurately, we always generate UINT32 and then copy the indices to UINT16 if possible. The reason for this is that COLLADA typically contains redundant vertex data that we optimize out, reducing the number of indices, so it's hard to predict the number of indices before actually generating them.

However, we can optimize here by computing a ceiling, even if it's just the number of indices in the COLLADA model to know when we *don't* need UINT32.

This should be profiled first, if the copying isn't a big performance hit, then it probably isn't worth complicating the code.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the UINT32 index generation and UINT16-copy path introduced by issue #159. Profile the current copying cost before changing it; the work is complete only if profiling shows a meaningful benefit and the implementation avoids unnecessary UINT32 generation without breaking conversion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance, tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.