v0.7
This release has large interface changes and introduces several new algorithms and tweaks to existing algorithms.
Interface:
- All C++ function wrappers have been moved out of
meshoptnamespace and gainedmeshopt_prefix to simplify documentation & interface - All structs used by the interface have been renamed and now also have
meshopt_prefix to avoid name conflicts meshopt_quantizeXfunctions now use function arguments instead of template parameters for better compatibilitycache_sizeargument has been removed frommeshopt_optimizeVertexCacheandmeshopt_optimizeOverdraw; to perform optimization for a FIFO cache of a fixed size, usemeshopt_optimizeVertexCacheFifo
New algorithms:
- Introduce an algorithm that compresses index buffers; it can be invoked using
meshopt_encodeIndexBufferandmeshopt_decodeIndexBuffer. The algorithm typically encodes index buffers using ~3-4 bits per index, and the resulting data can be compressed further by a general purpose compressor like zstd, yielding ~2-3 bits per index for most meshes. - Introduce an algorithm that can convert an index buffer to a triangle strip that is still reasonably cache efficient; indexed triangle strips are faster to render on some hardware and can reduce the index buffer size. The algorithm can be invoked using
meshopt_stripifyand typically produces buffers with around 60-65% indices compared to triangle lists, and a 5-10% ACMR penalty on GPUs with small caches. - Introduce a new quantization function,
meshopt_quantizeFloat, that can reduce the precision of a floating-point number while keeping the floating-point representation. This can be useful to generate vertex data that can be compressed more effectively using a general purpose compression algorithm.
Improvements:
- Overdraw analyzer (
meshopt_analyzeOverdraw) now uses a pixel center fill convention to match hardware rendering more closely. - Vertex cache analyzer (
meshopt_analyzeVertexCache) now models cache that matches real hardware a bit more closely, and requires additional parameters to configure (namely, primitive group size and warp/wavefront size). - Vertex cache optimizer (
meshopt_optimizeVertexCache) has been tuned to generate better output that performs well on real hardware, especially given meshes that have topology similar to that of a uniform grid as an input. - Various algorithms have been optimized for performance and memory consumption.