ModelVertexFormat

Description

[Flags]
enum Tinman.Engine.Models.ModelVertexFormat

Describes the vertex format used by a IModelGeometry.

This is the vertex element usage pattern of a geometry buffer:

Public / Constants

Position

public constant Position → (0:int32)

Geometry buffer stores vertex position using VertexElement.DefaultPosition at index 0.

This is a pseudo flag. Vertex positions are always stored.

Normal

public constant Normal → (1:int32)

Geometry buffer stores vertex normal vectors using VertexElement.DefaultNormal at index 0.

If not present, the GPU will compute them using partial derivatives of the vertex position.

See also

Semantic.Normal

TangentX

public constant TangentX → (2:int32)

Geometry buffer stores vertex tangent vectors (along texture X-axis) using VertexElement.DefaultTangent at index 0.

If not present, the GPU will compute them using partial derivatives of the vertex position and the texture coordinates.

TangentY

public constant TangentY → (4:int32)

Geometry buffer stores vertex tangent vectors (along texture Y-axis) using VertexElement.DefaultTangent at index 1.

If not present, the GPU will compute the cross product of Normal and TangentX to generate them.

Color

public constant Color → (8:int32)

Geometry buffer stores compressed sRGB vertex colors in the red / green / blue channels (if ModelPartFlags.VertexColorIsBaseColor is present) and linear opacity in the alpha channel (if ModelPartFlags.VertexAlphaIsOcclusion is not present), using VertexElement.DefaultColor at index 0.

See also

Semantic.Texture

TextureCoords

public constant TextureCoords → (16:int32)

Geometry buffer stores primary texture coordinates, using VertexElement.DefaultTextureCoords at index 0.

PositionExtra

public constant PositionExtra → (32:int32)

Geometry buffer stores vertex position precision delta values using VertexFormat.FloatDelta for VertexElementUsage.Position at index 1.

TextureCoordsExtra

public constant TextureCoordsExtra → (64:int32)

Geometry buffer stores secondary texture coordinates, using VertexElement.DefaultTextureCoords at index 1.

All

public constant All → (127:int32)

All vertex format flags.