COLLADA2GLTF icon indicating copy to clipboard operation
COLLADA2GLTF copied to clipboard

Optimize UINT32 indices generation

Open lasalvavida opened this issue 6 years ago • 0 comments

#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.

lasalvavida avatar Mar 15 '18 13:03 lasalvavida