Skip to content

Add EXT_meshopt_compression support - #51

Open
relh wants to merge 4 commits into
treeform:masterfrom
relh:feature/ext-meshopt-compression
Open

Add EXT_meshopt_compression support#51
relh wants to merge 4 commits into
treeform:masterfrom
relh:feature/ext-meshopt-compression

Conversation

@relh

@relh relh commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • decode ATTRIBUTES, TRIANGLES, and INDICES meshopt streams in pure Nim
  • apply NONE, OCTAHEDRAL, QUATERNION, and EXPONENTIAL filters
  • resolve compressed buffer views before existing accessor reads, including required-extension placeholder buffers

Proof

  • nim check src/gltf/meshopt.nim
  • nim check src/gltf/reader.nim
  • nim r -d:release tests/test_meshopt.nim
  • nim r -d:release tests/test_mesh_quantization.nim
  • CI sparsely checks out Khronos glTF Sample Assets at 9429648735279342b4c32b8745f7904196607379
  • CI loads both AnimatedMorphCube/glTF-Quantized and BrainStem/glTF-Meshopt-EXT, asserting their required extensions, renderable geometry, and supported status
  • local BrainStem/glTF-Meshopt-EXT result: 49 primitives and 34,084 decoded points
  • official meshoptimizer-derived byte vectors cover all three modes and all four filters
  • loaded real compact Hades assets including static desert_bones.glb, multi-mesh inf_forest_flower_00.glb, and skinned/animated wolf.glb, glub.glb, donkey.glb, and bunny.glb
  • git diff --check

Stacked on #50 because compact meshopt glTFs also use KHR_mesh_quantization. The decoder implementation follows meshoptimizer under its MIT license; no JavaScript or native binary dependency is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant