Skip to content

feat(extensions,functions): Allow encoding meshopt-compressed float32 accessors#1526

Draft
donmccurdy wants to merge 2 commits intomainfrom
feat/meshopt-f32
Draft

feat(extensions,functions): Allow encoding meshopt-compressed float32 accessors#1526
donmccurdy wants to merge 2 commits intomainfrom
feat/meshopt-f32

Conversation

@donmccurdy
Copy link
Owner

@donmccurdy donmccurdy commented Oct 11, 2024

@donmccurdy donmccurdy changed the title feat(extensions,functions): Allow encoding meshopt-compressed float33 accessors feat(extensions,functions): Allow encoding meshopt-compressed float32 accessors Oct 11, 2024
@zeux
Copy link

zeux commented Oct 12, 2024

FWIW while two out of three filters that EXT_meshopt_compression provides are designed for quantized data (normals & quaternions), the exponential filter is designed for float32 data and can be used without KHR_mesh_quantization; gltfpack will do this when asked (using -vpf or -vtf flags for positions or texture coordinates respectively). Only noting this because it looks like this PR assumes filters must be applied to quantized accessors.

The value of using exponential filter is that it is transparent to the application (as it's just a transform that the rest of glTF document doesn't observe) but it allows to smoothly adjust compression ratio with some precision loss (controlled via bits & mode). The compression ratio (and VRAM savings!) are still the best with quantized data, so it's not a full replacement, but a useful alternative.

@donmccurdy
Copy link
Owner Author

@zeux Really helpful, thank you! I see I have some incorrect assumptions in this PR — I may need to rethink the API currently exposed for configuring EXT_meshopt_compression.

@donmccurdy donmccurdy marked this pull request as draft October 14, 2024 01:22
@donmccurdy donmccurdy modified the milestones: v4.1, 🗄️ Backlog Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow writing EXT_meshopt_compression without quantization

2 participants