-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
…ats. Removed texture coordinate compression.
#2212 Needs to be merged before this. |
return geometry; | ||
} | ||
|
||
normals = normals.values; |
There was a problem hiding this comment.
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.
Update CHANGES.md. |
' czm_non_compressed_main(); \n' + | ||
'}'; | ||
|
||
return createShaderSource({ sources : [attributeDecl, globalDecl, modifiedVS, compressedMain] }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. Just those trivial comments. |
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.