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

Added support for glTF 1.0.1 normalized to quantizeAttributes #165

Merged
merged 3 commits into from
Aug 31, 2016

Conversation

lasalvavida
Copy link
Contributor

Adds an optional flag to use the glTF 1.0.1 normalized property for higher precision decode matrices.

@lasalvavida
Copy link
Contributor Author

Used to generate the test model for CesiumGS/cesium#4247

@lilleyse, can you look at this when you get a chance?

@lilleyse
Copy link
Contributor

@lilleyse, can you look at this when you get a chance?

Yes I'll check this out soon.

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 30, 2016

CC @lexaknyazev - glTF 1.0.1

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 30, 2016

I'm not following why this is needed.

@lasalvavida
Copy link
Contributor Author

lasalvavida commented Aug 30, 2016

This is one of the advantages of having glTF 1.0.1. By adding the normalized flag to a quantized accessor, the decode matrix doesn't need to be stored as 1.0/65535.0, since this is done automatically by normalizing the data. This gives you the option to generate quantized models that decode with higher precision by not rounding in the glTF.

The rounding is done by the GPU when it normalizes, so you automatically get the precision of the system you're running on.

It also shrinks the glTF asset since the decode matrix won't be full of enormous floating point strings anymore.

@lilleyse
Copy link
Contributor

+1 from me

@pjcozzi
Copy link
Contributor

pjcozzi commented Aug 31, 2016

OK, does this still strictly conform to the extension or does that need an update?

@lasalvavida
Copy link
Contributor Author

No updates needed, this strictly conforms to the extension.

@pjcozzi pjcozzi merged commit 2defe2d into master Aug 31, 2016
@pjcozzi pjcozzi deleted the quantized-normalized branch August 31, 2016 21:06
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.

3 participants