Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

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