# meshoptimizer | Arseny Kapoulkine | Knowledge Base | Instagit

Mesh optimization library that makes meshes smaller and faster to render

GitHub Stars: 8.1k

Repository: https://github.com/zeux/meshoptimizer

---

## Articles

### [How the Meshoptimizer Index Codec Rotates Triangles for Better Compression](/zeux/meshoptimizer/how-meshoptimizer-index-codec-handles-triangle-rotation-for-compression)

Discover how the meshoptimizer index codec rotates triangles to optimize FIFO cache usage and achieve superior compression for your 3D models.

- Tags: internals
- Published: 2026-07-12

### [How to Use Meshoptimizer's Experimental API Functions and Understand Stability Guarantees](/zeux/meshoptimizer/using-meshoptimizer-experimental-api-and-stability)

Explore meshoptimizer's experimental API functions to leverage cutting-edge features. Understand stability guarantees and how they differ from stable APIs for robust development.

- Tags: how-to-guide
- Published: 2026-07-12

### [The Difference Between meshopt_generateVertexRemap and meshopt_generatePositionRemap in meshoptimizer](/zeux/meshoptimizer/difference-between-meshopt_generatevertexremap-and-meshopt_generatepositionremap)

Understand the difference between meshopt_generateVertexRemap and meshopt_generatePositionRemap. Learn how each function optimizes vertex data for efficient 3D asset pipelines.

- Tags: deep-dive
- Published: 2026-07-12

### [How to Generate an Adjacency Index Buffer for Silhouette Detection with `meshopt_generateAdjacencyIndexBuffer`](/zeux/meshoptimizer/generating-adjacency-index-buffers-with-meshopt_generateadjacencyindexbuffer)

Learn how to generate an adjacency index buffer for silhouette detection with meshopt_generateAdjacencyIndexBuffer. Streamline GPU passes for efficient edge detection.

- Tags: how-to-guide
- Published: 2026-07-12

### [How to Handle Degenerate and Duplicate Triangles with meshopt_filterIndexBuffer](/zeux/meshoptimizer/handling-degenerate-and-duplicate-triangles-with-meshopt_filterindexbuffer)

Learn how meshopt_filterIndexBuffer handles degenerate and duplicate triangles, simplifying your mesh and optimizing rendering performance. Discover efficient index buffer processing.

- Tags: how-to-guide
- Published: 2026-07-12

### [Cluster-Relative Position Quantization in meshoptimizer: How to Use `meshopt_computePositionExponent`](/zeux/meshoptimizer/what-is-cluster-relative-position-quantization-and-meshopt_computepositionexponent)

Learn cluster-relative position quantization with meshoptimizer. Discover how to use meshopt_computePositionExponent to optimize vertex positions and reduce memory bandwidth for better performance.

- Tags: deep-dive
- Published: 2026-07-12

### [How to Use meshopt_partitionClusters for Nanite-Style Hierarchical LOD](/zeux/meshoptimizer/using-meshopt_partitionclusters-for-hierarchical-lod)

Learn how to use meshopt_partitionClusters for Nanite-style hierarchical LOD. Group clusters for efficient culling and build LOD nodes with meshoptimizer.

- Tags: how-to-guide
- Published: 2026-07-12

### [How meshopt_spatialSortRemap Improves Point Cloud Compression: A Deep Dive](/zeux/meshoptimizer/how-meshopt_spatialsortremap-improves-point-cloud-compression)

Discover how meshopt_spatialSortRemap boosts point cloud compression by reordering vertices with Morton codes, achieving 30-50% smaller sizes with delta-based encoders.

- Tags: deep-dive
- Published: 2026-07-12

### [How to Use Vertex Filters for glTF Serialization Without Shader Changes](/zeux/meshoptimizer/using-vertex-filters-for-gltf-serialization-without-shader-changes)

Learn how to use meshoptimizer's vertex filters for glTF serialization. Preserve original values without shader changes using the EXT_meshopt_compression extension.

- Tags: how-to-guide
- Published: 2026-07-12

### [Vertex Quantization Methods in meshoptimizer: Half-Precision, Snorm, and Unorm](/zeux/meshoptimizer/meshoptimizer-supported-vertex-quantization-methods)

Explore vertex quantization methods in meshoptimizer: half-precision, snorm, and unorm. Optimize your 3D assets with these powerful techniques for smaller file sizes and faster loading.

- Tags: deep-dive
- Published: 2026-07-12

### [How to Decode Meshlet Data on the GPU Using Write-Combined Memory](/zeux/meshoptimizer/decoding-meshlet-data-on-gpu-with-write-combined-memory)

Decode meshlet data on GPU with write-combined memory for maximum throughput. Stream decoded vertices and triangles directly into GPU buffers, eliminating CPU copies.

- Tags: how-to-guide
- Published: 2026-07-12

### [How to Use meshopt_encodeMeshlet for Mesh Shader Workloads](/zeux/meshoptimizer/using-meshopt_encodemesnlet-for-mesh-shader-workloads)

Learn to use meshopt_encodeMeshlet to pack meshlet data for GPU mesh shaders. Stream compact binary formats for efficient rendering in your projects.

- Tags: how-to-guide
- Published: 2026-07-12

### [meshopt_encodeIndexBuffer Compression Ratio: Expected Results and Best Practices](/zeux/meshoptimizer/expected-compression-ratio-meshopt_encodeindexbuffer-and-best-results)

Achieve 1 byte per triangle compression with meshopt_encodeIndexBuffer. Discover expected results and best practices for index buffer optimization, reducing data size significantly.

- Tags: best-practices
- Published: 2026-07-12

### [How to Implement Cluster Cone Culling with meshopt_computeMeshletBounds in meshoptimizer](/zeux/meshoptimizer/implementing-cluster-cone-culling-with-meshopt_computemeshletbounds)

Learn to implement cluster cone culling using meshopt_computeMeshletBounds in meshoptimizer. Optimize your rendering by culling back-facing clusters efficiently.

- Tags: how-to-guide
- Published: 2026-07-12

### [meshopt_buildMeshlets vs meshopt_buildMeshletsSpatial for Ray Tracing: Key Differences Explained](/zeux/meshoptimizer/meshopt_buildmeshlets-vs-meshopt_buildmeshletsspatial-for-raytracing)

Understand meshopt_buildMeshlets vs meshopt_buildMeshletsSpatial for ray tracing. Choose meshopt_buildMeshlets for vertex cache efficiency and meshopt_buildMeshletsSpatial for spatial locality and BVH traversal performance.

- Tags: deep-dive
- Published: 2026-07-12

### [How meshopt_buildMeshlets Works and Recommended max_vertices/max_triangles Limits](/zeux/meshoptimizer/how-meshopt_buildmeshlets-works-and-recommended-limits)

Understand how meshopt_buildMeshlets works and discover optimal max_vertices and max_triangles limits for efficient mesh optimization and improved rendering performance.

- Tags: deep-dive
- Published: 2026-07-12

### [How to Generate Shadow Index Buffers with meshopt_generateShadowIndexBuffer for Depth-Only Passes](/zeux/meshoptimizer/generating-shadow-index-buffers-with-meshopt_generateshadowindexbuffer)

Generate shadow index buffers with meshopt_generateShadowIndexBuffer for depth-only passes. Reduce vertex fetch bandwidth by eliminating duplicate vertices for shadow mapping and Z-prepass rendering.

- Tags: how-to-guide
- Published: 2026-07-12

### [How to Use meshopt_generateVertexRemapCustom for Floating-Point Tolerance When Merging Vertices](/zeux/meshoptimizer/using-meshopt_generatevertexremapcustom-with-float-tolerance)

Learn how to use meshopt_generateVertexRemapCustom for floating-point tolerance when merging vertices. This guide shows you how to achieve precise vertex merging with custom equality callbacks and epsilon distance comparisons.

- Tags: how-to-guide
- Published: 2026-07-12

### [Recommended Pipeline Order for Mesh Optimization: Index → Cache → Overdraw → Fetch → Quantization](/zeux/meshoptimizer/recommended-mesh-optimization-pipeline-order)

Learn the recommended mesh optimization pipeline order: Indexing, Cache, Overdraw, Fetch, Quantization. Maximize GPU efficiency with this in-place sequence.

- Tags: best-practices
- Published: 2026-07-12

### [How `meshopt_optimizeVertexFetch` Improves GPU Memory Bandwidth Through Vertex Fetch Optimization](/zeux/meshoptimizer/how-meshopt_optimizevertexfetch-improves-gpu-memory-bandwidth)

Optimize GPU memory bandwidth with meshopt_optimizeVertexFetch. Discover how reordering vertex data eliminates over-fetch and maximizes cache line utilization for faster rendering.

- Tags: deep-dive
- Published: 2026-07-12

### [How to Optimize Mesh Overdraw with `meshopt_optimizeOverdraw`: Threshold Values and Implementation Guide](/zeux/meshoptimizer/how-to-optimize-overdraw-with-meshopt_optimizeoverdraw-and-thresholds)

Minimize mesh overdraw with meshopt_optimizeOverdraw. Learn optimal threshold values and implementation guide to reduce rendering cost and improve performance in your graphics applications.

- Tags: how-to-guide
- Published: 2026-07-12

### [When to Use meshopt_optimizeVertexCacheFifo Over meshopt_optimizeVertexCache: A Complete Guide](/zeux/meshoptimizer/when-to-use-meshopt_optimizevertexcachefifo-vs-meshopt_optimizevertexcache)

Learn when to use meshopt_optimizeVertexCacheFifo versus meshopt_optimizeVertexCache. Discover deterministic reordering for preserved triangle sequences or aggressive optimization for maximum cache hits.

- Tags: how-to-guide
- Published: 2026-07-12

### [How meshopt_optimizeVertexCache Works and Which GPU Cache Sizes It Targets](/zeux/meshoptimizer/how-meshopt_optimizevertexcache-works-and-cache-sizes)

Learn how meshopt_optimizeVertexCache reorders triangle indices using a greedy algorithm for a 16-entry GPU vertex cache to boost post-transform cache hits.

- Tags: internals
- Published: 2026-07-12

### [How to Analyze Mesh Optimization Effectiveness with meshopt_analyzeVertexCache](/zeux/meshoptimizer/how-to-analyze-mesh-optimization-effectiveness-meshopt_analyzevertexcache)

Analyze mesh optimization effectiveness with meshopt_analyzeVertexCache. Learn ACMR and ATVR metrics to quantify GPU transform cache efficiency. Optimize your index buffers today.

- Tags: how-to-guide
- Published: 2026-07-11

### [How meshopt_stripify Converts Triangle Lists to Triangle Strips in meshoptimizer](/zeux/meshoptimizer/how-meshopt_stripify-convert-triangle-lists-triangle-strips)

Learn how meshopt_stripify converts triangle lists to triangle strips using a greedy algorithm to optimize geometry. Understand stripification for better rendering performance.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Decode Meshoptimizer-Compressed glTF in Three.js or Babylon.js](/zeux/meshoptimizer/how-to-decode-meshoptimizer-compressed-gltf-threejs-babylonjs)

Easily decode meshoptimizer compressed glTF models in Three.js or Babylon.js. Learn how to integrate the meshopt_decoder module and accelerate your 3D workflows.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Use gltfpack Command-Line Options for glTF Optimization: A Complete Guide](/zeux/meshoptimizer/how-to-use-gltfpack-command-line-options-gltf-optimization)

Master gltfpack command-line options to optimize glTF assets. Discover quantization, compression, and simplification techniques with this comprehensive guide.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Generate Adjacency Index Buffers for Geometry Shaders and Tessellation](/zeux/meshoptimizer/how-to-generate-adjacency-index-buffers-tessellation-geometry-shaders)

Generate adjacency index buffers for geometry and tessellation shaders using zeux meshoptimizer library. Optimize your graphics with efficient index generation for displacement mapping and silhouette detection.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Use Multi-Stream Vertex Remapping with meshopt_generateVertexRemapMulti](/zeux/meshoptimizer/how-to-use-multi-stream-vertex-remapping-meshopt_generatevertexremapmulti)

Learn multi-stream vertex remapping with meshopt_generateVertexRemapMulti. Optimize meshes with multiple attribute streams efficiently using this powerful function from meshoptimizer.

- Tags: how-to-guide
- Published: 2026-07-11

### [How meshopt_generateShadowIndexBuffer Works for Shadow Passes](/zeux/meshoptimizer/how-meshopt_generateshadowindexbuffer-work-shadow-passes)

Learn how meshopt_generateShadowIndexBuffer optimizes shadow passes by collapsing vertices and reducing redundant fetches for efficient depth only rendering.

- Tags: deep-dive
- Published: 2026-07-11

### [How to Implement Meshlet Cluster Culling using meshopt_computeMeshletBounds](/zeux/meshoptimizer/how-to-implement-meshlet-cluster-culling-meshopt_computemeshletbounds)

Learn to implement meshlet cluster culling with meshopt_computeMeshletBounds. Optimize performance by transforming bounds and performing rejection tests.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Use meshopt_buildMeshletsSpatial for Ray Tracing with SAH Optimization](/zeux/meshoptimizer/how-to-use-meshopt_buildmeshletsspatial-ray-tracing-sah-optimization)

Optimize meshes for ray tracing with meshopt_buildMeshletsSpatial. Learn to cluster triangles, minimize SAH cost, and compute bounds for efficient GPU culling.

- Tags: how-to-guide
- Published: 2026-07-11

### [Recommended max_vertices and max_triangles for NVIDIA vs AMD Mesh Shaders](/zeux/meshoptimizer/recommended-max_vertices-max_triangles-nvidia-amd-mesh-shaders)

Discover optimal max_vertices and max_triangles for NVIDIA vs AMD mesh shaders. Maximize GPU performance with recommended settings for Turing, RDNA2, and newer hardware.

- Tags: best-practices
- Published: 2026-07-11

### [How to Integrate meshopt_encodeMeshlet/meshopt_decodeMeshlet for Mesh Shader Pipelines](/zeux/meshoptimizer/how-to-integrate-meshopt_encodemeshlet-decodemeshlet-mesh-shader-pipelines)

Learn to integrate meshopt_encodeMeshlet and meshopt_decodeMeshlet for mesh shader pipelines. Optimize your graphics by encoding meshlets offline and decoding them efficiently on CPU or GPU.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Encode and Decode Vertex Buffers with Meshoptimizer Compression Codec](/zeux/meshoptimizer/how-to-encode-decode-vertex-buffers-meshoptimizer-compression-codec)

Learn to encode and decode vertex buffers efficiently with meshoptimizer compression codec. Use meshopt_encodeVertexBuffer and meshopt_decodeVertexBuffer for fast, lossless data conversion.

- Tags: how-to-guide
- Published: 2026-07-11

### [Preprocessing Requirements for meshoptimizer Index Buffer Compression](/zeux/meshoptimizer/preprocessing-required-meshoptimizer-index-buffer-compression)

Unlock efficient index buffer compression with meshoptimizer. Discover essential preprocessing steps like vertex remapping and optimization for byte per triangle ratio.

- Tags: how-to-guide
- Published: 2026-07-11

### [How to Handle Vertex Locks During Mesh Simplification in meshoptimizer](/zeux/meshoptimizer/how-to-handle-vertex-locks-mesh-simplification-meshoptimizer)

Learn how to handle vertex locks during mesh simplification in meshoptimizer. Use flags like meshopt_SimplifyVertex_Lock to control vertex movement and protect attribute seams.

- Tags: how-to-guide
- Published: 2026-07-11

### [Mesh Simplification Options in meshoptimizer: Complete Guide to Flags Like meshopt_SimplifyLockBorder](/zeux/meshoptimizer/mesh-simplification-options-meshopt_simplifylockborder)

Discover mesh simplification options in meshoptimizer including meshopt_SimplifyLockBorder. Control border preservation, error metrics, and triangle regularity for efficient mesh reduction.

- Tags: deep-dive
- Published: 2026-07-11

### [How to Use meshopt_simplifyWithAttributes for Mesh Simplification with Attribute Preservation](/zeux/meshoptimizer/how-to-use-meshopt_simplifywithattributes-mesh-simplification-attribute-preservation)

Learn to use meshopt_simplifyWithAttributes to reduce mesh triangle count while preserving vertex attributes like normals UVs and colors using the meshoptimizer library.

- Tags: how-to-guide
- Published: 2026-07-11

### [meshopt_optimizeVertexCache vs meshopt_optimizeVertexCacheFifo vs meshopt_optimizeVertexCacheStrip: Choosing the Right Vertex Cache Optimizer](/zeux/meshoptimizer/difference-meshopt_optimizevertexcache-fifo-strip)

Understand meshopt_optimizeVertexCache vs FIFO vs Strip. Learn how each offers trade-offs for mesh processing speed and GPU cache efficiency. Choose the best optimizer for your needs.

- Tags: deep-dive
- Published: 2026-07-11

### [How meshopt_optimizeOverdraw Balances Vertex Cache and Pixel Overdraw](/zeux/meshoptimizer/how-meshopt_optimizeoverdraw-balances-vertex-cache-pixel-overdraw)

Discover how meshopt_optimizeOverdraw balances vertex cache and pixel overdraw using triangle reordering and configurable thresholds for optimal mesh performance.

- Tags: deep-dive
- Published: 2026-07-11

### [How to Use meshopt_generateVertexRemap with Custom Floating-Point Tolerance](/zeux/meshoptimizer/how-to-use-meshopt_generatevertexremap-custom-float-tolerance)

Learn how to use meshopt_generateVertexRemap with custom floating-point tolerance by utilizing meshopt_generateVertexRemapCustom and defining a comparison callback function for precise vertex remap control.

- Tags: how-to-guide
- Published: 2026-07-11

### [Correct Order for the Mesh Optimization Pipeline in zeux/meshoptimizer](/zeux/meshoptimizer/correct-order-mesh-optimization-pipeline-meshoptimizer)

Discover the correct mesh optimization pipeline order in zeux/meshoptimizer. Follow this critical seven-step sequence for optimal results and efficient processing.

- Tags: how-to-guide
- Published: 2026-07-11

### [What GPU Architectures Does zeux/meshoptimizer's Vertex Cache Optimization Target?](/zeux/meshoptimizer/what-gpu-architectures-does-zeux-meshoptimizer-vertex-cache-optimization-target)

Discover which GPU architectures zeux/meshoptimizer's vertex cache optimization targets. Optimize your graphics for NVIDIA and AMD GPUs with a 16-entry cache.

- Tags: internals
- Published: 2026-07-11

### [How the zeux/meshoptimizer Vertex Cache Optimization Algorithm Works](/zeux/meshoptimizer/how-does-zeux-meshoptimizer-vertex-cache-optimization-algorithm-work)

Discover how zeux meshoptimizer uses Tom Forsyth's Linear Speed Vertex Cache Optimization to boost GPU performance. Learn about precomputed scores and greedy reordering for maximum cache hits.

- Tags: internals
- Published: 2026-07-11

