Skip to content

Latest commit

 

History

History

FeatureIdAttribute

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Feature ID Attributes

This sample demonstrates usage of the EXT_mesh_features extension for storing feature IDs for vertices of a mesh.

The sample contains a glTF asset with a single mesh primitive. The mesh primitive consists of 4 quads (each formed by 2 triangles). The vertices in this mesh primitive have the usual POSITION and NORMAL vertex attributes.

Feature IDs

Additionally, each vertex has a feature ID. In this example, the feature ID is given by the _FEATURE_ID_0 attribute of the mesh primitive. This attribute refers to a standard glTF accessor with type "SCALAR" and component type UNSIGNED_BYTE, so that each vertex is associated with one UNSIGNED_BYTE value as its feature ID.

The following image shows the mesh primitive with its vertices, their indices, and their feature IDs:

Image

Screenshot

Screenshot

Example Sandcastle

This example can be viewed with the common sandcastle code.

License

CC0