Standard glTF Vertex Attribute Semantics
The glTF 2.0 specification defines a set of standard vertex attribute semantics used by renderers to correctly interpret mesh geometry. These standardized names ensure portability across rendering engines and authoring tools, identifying geometric data such as positions, normals, texture coordinates, colors, and skinning data. This guide details each built-in vertex attribute semantic recognized in glTF, including its expected data format and structural requirements.
POSITION
The POSITION attribute defines the 3D local coordinates
of the mesh vertices.
- Accessor Type:
VEC3 - Component Type:
FLOAT - Requirement: Required for all standard solid
meshes. It defines the base spatial bounding box (
minandmaxaccessor properties are mandatory forPOSITION).
NORMAL
The NORMAL attribute specifies the unit-length surface
normals of the mesh, essential for directional lighting and shading
calculations.
- Accessor Type:
VEC3 - Component Type:
FLOAT - Details: Values must be normalized to unit length.
TANGENT
The TANGENT attribute defines vertex tangents used in
tangent-space normal mapping.
- Accessor Type:
VEC4 - Component Type:
FLOAT - Details: The
xyzcomponents represent the normalized tangent vector, orthogonal to the normal. Thewcomponent indicates bitangent sign/handedness and must be set to either1.0or-1.0.
TEXCOORD_n
The TEXCOORD_n attribute defines 2D UV mapping
coordinates for textures. A mesh can have multiple sets indexed
consecutively starting at zero (TEXCOORD_0,
TEXCOORD_1, etc.).
- Accessor Type:
VEC2 - Component Type:
FLOAT,UNSIGNED_BYTE(normalized), orUNSIGNED_SHORT(normalized) - Details: The origin
(0.0, 0.0)corresponds to the top-left corner of the texture image.
COLOR_n
The COLOR_n attribute defines per-vertex color
information. Similar to texture coordinates, multiple sets use indexed
naming (COLOR_0, COLOR_1, etc.).
- Accessor Type:
VEC3(RGB) orVEC4(RGBA) - Component Type:
FLOAT,UNSIGNED_BYTE(normalized), orUNSIGNED_SHORT(normalized) - Details: Color values are stored in linear color space, not sRGB.
JOINTS_n
The JOINTS_n attribute contains the indices of the
skeleton joints (bones) that affect a vertex during skeletal animation.
Sets are indexed sequentially (JOINTS_0,
JOINTS_1, etc.).
- Accessor Type:
VEC4 - Component Type:
UNSIGNED_BYTEorUNSIGNED_SHORT - Details: Each joint index references an entry in
the skin's
jointsarray.
WEIGHTS_n
The WEIGHTS_n attribute defines the linear weights
corresponding to the joints referenced in JOINTS_n. Sets
are indexed sequentially (WEIGHTS_0,
WEIGHTS_1, etc.).
- Accessor Type:
VEC4 - Component Type:
FLOAT,UNSIGNED_BYTE(normalized), orUNSIGNED_SHORT(normalized) - Details: The weights for a single vertex across all
sets must sum to
1.0.
Morph Target Attributes
In addition to base mesh attributes, glTF primitives can declare morph target arrays. Within a target object, morph displacements use a subset of the standard semantics:
POSITION: Morph target position offsets (VEC3,FLOAT).NORMAL: Morph target normal offsets (VEC3,FLOAT).TANGENT: Morph target tangent offsets (VEC3,FLOAT— note that the handednesswcomponent is omitted in morph targets).
Application-Specific Attributes
Any attribute name that is not part of this standard set must start
with an underscore (e.g., _CUSTOM_DATA). Non-standard
attributes without an underscore are invalid under the glTF 2.0
specification.