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

Fixes issue with framing a quantized GLTF #2463

Merged
2 commits merged into from
Jun 10, 2021
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jun 8, 2021

Resolve framing/rendering issue with quantized models.

fixes #2450

Reference Issue

@ghost ghost requested a review from elalish June 8, 2021 23:29
Copy link
Collaborator

@elalish elalish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ghost ghost merged commit 7dae842 into master Jun 10, 2021
*/
export const getNormalizedComponentScale =
(buffer: BufferAttribute|InterleavedBufferAttribute) => {
const array: ArrayLike<number> = buffer.array;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May need to check buffer.normalized here - the array could be Uint8Array but not normalized.

@ghost
Copy link
Author

ghost commented Jun 16, 2021 via email

@donmccurdy
Copy link
Contributor

Sure, gltfpack produces models like that — here's an aggressively quantized duck for example:

DuckQuantized.glb.zip

@ghost ghost deleted the quantization-framing-fix branch June 16, 2021 20:40
This pull request was closed.
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.

Bounding box for quantized models computed incorrectly?
3 participants