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

gltfio: allow for multiple color attributes #8462

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

poweifeng
Copy link
Contributor

We are not correctly handling gltf models with multiple color attributes. Filament doesn't allow for more than one color attribute. So we just set the additional attributes as VertexAttribute::CUSOM(N).

Also properly clean up dummy buffer.

Fixes #8396

@poweifeng poweifeng added the internal Issue/PR does not affect clients label Feb 20, 2025
@poweifeng poweifeng force-pushed the pf/gltfio-fix-color-attributes branch from 4705591 to c254890 Compare February 20, 2025 00:38
Comment on lines 363 to 366
if (mDummyBufferObject) {
mEngine.destroy(mDummyBufferObject);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

was this just leaking before? Also is it safe to do this in the FAssetLoader dtor -- i.e. is it guaranteed to be called on the correct thread?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually, I misread the code. It was properly cleaned up before. I removed all the dummy buffer changes.

We are not correctly handling gltf models with multiple color
attributes. Filament doesn't allow for more than one color
attribute.  So we just set the additional attributes as
VertexAttribute::CUSOM(N).

Fixes #8396
@poweifeng poweifeng force-pushed the pf/gltfio-fix-color-attributes branch from c254890 to 66d3928 Compare February 20, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Issue/PR does not affect clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GLB model with two Face Corner Byte Color Attributes crashes VertexBuilder on iOS
2 participants