donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.3k stars 145 forks source link

perf(functions): Add a compact step to quantize() #1395

Closed donmccurdy closed 1 month ago

donmccurdy commented 1 month ago

Currently quantize() quantizes each attribute, without regard for indices. This change adds a compactPrimitive(prim) step for any primitives with <50% vertex stream utilization.

Times for quantizing the sparsely-indexed oval.gltf:

Related: