Semantics

Semantics provide a way to connect shader variables with data from a model

Semantics were first introduced as part of PVRShaman (PVR Shader Manager) and the original PFX format. It is a way to signify to an implementation (for example PVRShaman, or now the RenderManager class) what kind of information is required by a shader. In other words, which data from a model needs to be uploaded to which variable in the shader.

For example, in the PFX format it is possible to annotate the attribute myVertex with the semantic POSITION, so that PVRShaman knows to funnel the position vertex data from the POD file into this attribute and display the file. Semantics have been simplified and expanded since then.

Currently, semantics in the Model class have been made completely flexible, allowing any vertex attribute or material attribute to be annotated with any semantic, allowing the reader (POD or GLTF currently) to define semantics, and then it is up to the application to use these semantics.

In the PowerVR SDK, the convenient PVRShaman semantics are still being used, but it is up to the two sides (the model and the renderer) to decide on the semantics and what they mean.