KhronosGroup / KhronosGroup/glTF

Unsigned integer attributes ambiguity

Open
#2,164 1 comment 0 reactions 1 assignee Claimed by @lexaknyazev View on GitHub
specification
Dominant language
HTML
Stars
7.8k
Forks
1.2k
Avg merge
17h 26m
Merged PRs (30d)
5

Description

The spec states in [section 5.24.2](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#_mesh_primitive_indices) that for `mesh.primitive.indices`

> When defined, the accessor **MUST** have `SCALAR` type and an unsigned integer component type.

Does this mean that only 32 bit integers as indices are supported? Or is `unsigned integer` referring to all possible unsigned integer types. i.e. `5121: unsigned byte`, `5123: unsigned short` and `5125: unsigned int`.

Similarly, [section 3.7.2.1](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#meshes-overview) mentions

> Application-specific attribute semantics **MUST NOT** use `unsigned int` component type.

Is this referring to all integer component types or only the 32 bit variant?

[Section 5.1.3](https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#_accessor_componenttype) is a bit more clear about this:

> `UNSIGNED_INT` type **MUST NOT** be used for any accessor that is not referenced by `mesh.primitive.indices`.

This seems to suggest only the 32 bit variant isn't allowed. But the wording makes it seem like it could be allowed as long as at least one indices accessor references it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.