@zeux zeux released this Jan 11, 2018 · 250 commits to master since this release

Assets 2

This release has large interface changes and introduces several new algorithms and tweaks to existing algorithms.


  • All C++ function wrappers have been moved out of meshopt namespace and gained meshopt_ 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_quantizeX functions now use function arguments instead of template parameters for better compatibility
  • cache_size argument has been removed from meshopt_optimizeVertexCache and meshopt_optimizeOverdraw; to perform optimization for a FIFO cache of a fixed size, use meshopt_optimizeVertexCacheFifo

New algorithms:

  • Introduce an algorithm that compresses index buffers; it can be invoked using meshopt_encodeIndexBuffer and meshopt_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_stripify and 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.


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