-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Align Vertex Buffer to 4 Bytes #51376
Conversation
With the octahedral compression, we had attributes of a size of 2 bytes which potentially caused performance regressions on iOS/Mac Now add padding to the normal/tangent buffer For octahedral, normal will always be oct32 encoded UNLESS tangent exists and is also compressed then both will be oct16 encoded and packed into a vec4<GL_BYTE> attribute
CC @clayjohn @RevoluPowered made some updates to make sure the bytes we have are used as efficiently as possible and created the PR! just wondering if the logic might be confusing for those who want to vertex data to the buffers directly? |
Sweet I will check this out tonight |
Checking the PR out now :) sorry work was keeping me busy |
Performance is great, no reported issues! Tried with both indexing settings, no visual bugs |
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.
Tested: Regressions with performance gone :)
Thanks! |
With the octahedral compression, we had attributes of a size of 2 bytes
which potentially caused performance regressions on iOS/Mac
Now add padding to the normal/tangent buffer
For octahedral, normal will always be oct32 encoded
UNLESS tangent exists and is also compressed
then both will be oct16 encoded and packed into a vec4<GL_BYTE>
attribute