VertexElementType

Description

enum Tinman.Terrain.Rendering.VertexElementType

Enumeration of data types of vertex format elements.

The following data types are available on most graphics APIs with decent GPUs, both with and without normalization (see VertexElementFlags.Normalize).

Using only the data types above might remedy the need to use IBufferFactory.ValidateVertexElement.

Public / Constants

Placeholder

public constant Placeholder → (0:int32)

A placeholder for a VertexElementUsage that is not present in the vertex format but still needs to increment the usage counter.

A VertexElement of this type always has zero VertexElement.Size and VertexElement.Count.

Float

public constant Float → (1:int32)

A 32-bit floating-point value.

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    8
    3 |   12
    4 |   16

No normalization will be performed for values of this type.

SInt8

public constant SInt8 → (2:int32)

An 8-bit signed integer value in the range [-128..127].

The VertexElement.Size of this type is always 4.
The normalization range is [-1..1].

SInt10

public constant SInt10 → (3:int32)

A 10-bit signed integer value in the range [-512..511].

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    4
    3 |    4
    4 |  n/a

The normalization range is [0..1].

SInt16

public constant SInt16 → (4:int32)

A 16-bit signed integer value in the range [-32768..32767].

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    4
    3 |    8
    4 |    8

The normalization range is [-1..1].

SInt32

public constant SInt32 → (5:int32)

A 32-bit signed integer value in the range [-2147483648..2147483647].

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    8
    3 |   12
    4 |   16

No normalization will be performed for values of this type.

UInt8

public constant UInt8 → (6:int32)

An 8-bit unsigned integer value in the range [0..255].

The VertexElement.Size of this type is always 4.
The normalization range is [0..1].

UInt10

public constant UInt10 → (7:int32)

A 10-bit unsigned integer value in the range [0..1023].

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    4
    3 |    4
    4 |  n/a

The normalization range is [0..1].

UInt16

public constant UInt16 → (8:int32)

An 16-bit unsigned integer value in the range [0..65535].

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    4
    3 |    8
    4 |    8

The normalization range is [0..1].

UInt32

public constant UInt32 → (9:int32)

A 32-bit unsigned integer value in the range [0..4294967296].

A VertexElement of this type has the following VertexElement.Size, depending on its VertexElement.Count:

Count | Size
------+-----
    1 |    4
    2 |    8
    3 |   12
    4 |   16

No normalization will be performed for values of this type.