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

Compress Primitive normals #2213

Merged
merged 23 commits into from
Oct 23, 2014
Merged

Compress Primitive normals #2213

merged 23 commits into from
Oct 23, 2014

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Oct 22, 2014

For #1628.

Primitive normals are compressed using oct encoding and packed into floats. If the geometry has any combination of the following vertex attributes: texture coordinates, normal, tangent and binormal, they will all be packed into a single vec4 attribute.

@bagnell
Copy link
Contributor Author

bagnell commented Oct 22, 2014

#2212 Needs to be merged before this.

return geometry;
}

normals = normals.values;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that we should change the variables type like this. I think it will confuse the optimizer - and this is a function we would like the optimizer to do well with for KML loading performance.

Same comment below.

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 22, 2014

Update CHANGES.md.

' czm_non_compressed_main(); \n' +
'}';

return createShaderSource({ sources : [attributeDecl, globalDecl, modifiedVS, compressedMain] });
Copy link
Contributor

Choose a reason for hiding this comment

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

Heads up - #2214 will break this. CC @shunter

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 22, 2014

This is awesome. Just those trivial comments.

@bagnell
Copy link
Contributor Author

bagnell commented Oct 22, 2014

@pjcozzi This is ready unless you want to wait for #2214 first.

pjcozzi added a commit that referenced this pull request Oct 23, 2014
@pjcozzi pjcozzi merged commit 2037999 into master Oct 23, 2014
@pjcozzi pjcozzi deleted the compressNormals branch October 23, 2014 00:01
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.

2 participants