VertexElementUsage

Description

enum Tinman.Terrain.Rendering.VertexElementUsage

Enumeration of usage semantics of vertex format elements.

Usage semantics in combination with usage indices in the range [0..15] are used to map the elements of a vertex buffer (see VertexElement) to the inputs of a GPU shader (for example, a struct item in HLSL: float3 position : POSITION0;). The elements in this enumeration represent a safe set which can be mapped to old APIs, such as Direct3D 9. Other APIs (such as OpenGL) do not have the concept of usage semantics (for example, a vertex attribute in GLSL: in vec3 vs_position;). In these cases, a mapping from vertex attribute name (here: vs_position) to usage semantic and usage index (i.e. POSITION0) is provided from code. Besides the described mapping from vertex buffer elements to GPU shader inputs, there is no other meaning or behaviour attached to the items of this enumeration.

Public / Constants

Unknown

public constant Unknown → (0:int32)

Unknown usage.

Position

public constant Position → (1:int32)

A vertex element (roughly) intended for: positions.

Usage semantics and indices are only used to map vertex buffer elements to GPU shader inputs. Choosing this usage over another does not imply any special behaviour.

Normal

public constant Normal → (2:int32)

A vertex element (roughly) intended for: normal vectors.

Usage semantics and indices are only used to map vertex buffer elements to GPU shader inputs. Choosing this usage over another does not imply any special behaviour.

TextureCoords

public constant TextureCoords → (3:int32)

A vertex element (roughly) intended for: texture coordinates.

Usage semantics and indices are only used to map vertex buffer elements to GPU shader inputs. Choosing this usage over another does not imply any special behaviour.

Tangent

public constant Tangent → (4:int32)

A vertex element (roughly) intended for: tangent vectors.

Usage semantics and indices are only used to map vertex buffer elements to GPU shader inputs. Choosing this usage over another does not imply any special behaviour.

Color

public constant Color → (5:int32)

A vertex element (roughly) intended for: colors.

Usage semantics and indices are only used to map vertex buffer elements to GPU shader inputs. Choosing this usage over another does not imply any special behaviour.