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

Will the glTF support int or uint for custom attribute? #2256

Closed
insar-dev opened this issue Feb 15, 2023 · 1 comment
Closed

Will the glTF support int or uint for custom attribute? #2256

insar-dev opened this issue Feb 15, 2023 · 1 comment

Comments

@insar-dev
Copy link

Will the glTF support int or uint for custom attribute?

125 (UNSIGNED_INT) is only allowed when the accessor contains indices.

image

@javagl
Copy link
Contributor

javagl commented Feb 15, 2023

The name _FEATURE_ID_0 suggests that this may be intended for the use in the proposed EXT_mesh_features extension. The proposal carries an implementation note that says

Because glTF accessors do not support UNSIGNED_INT types for 32-bit integers in vertex attributes, FLOAT may be used instead allowing integer feature IDs up to 224. For smaller ranges of feature IDs, UNSIGNED_BYTE or UNSIGNED_SHORT may be used. As with other vertex attributes, each element of a feature ID accessor must align to 4-byte boundaries.

Regardless of that: No, glTF does not support UNSIGNED_INT for mesh attributes, and most likely never will (except for the case where support for this attribute may be added with a dedicated extension).

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

No branches or pull requests

2 participants