VertexElementFlags

Description

[Flags]
enum Tinman.Terrain.Rendering.VertexElementFlags

Enumeration of vertex element flags.

Public / Constants

None

public constant None → (0:int32)

No vertex element flags.

Normalize

public constant Normalize → (1:int32)

Shall denormalized integer values be normalized by the GPU before they arrive at the GPU program for processing?

Value normalization only applies to some integer data types, please refer to the respective VertexElementType items for details.

Values of unsigned integer types with N bits are divided by 2^N-1, in order to yield numbers in the range [0..1].

Values of signed integer types with N bits are divided by 2^(N-1)-1, in order to yield numbers in the range [-1..1].

The GPU will perform de-normalization automatically.

Srgb

public constant Srgb → (3:int32)

Shall sRGB compression be applied to floating-point input values X, Y and Z before de-normalizing them to integer values?

The GPU will not perform automatic sRGB decompression. This must be done by the GPU program.

This flag implies Normalize.

Shift

public constant Shift → (5:int32)

Shall floating-point input values be shifted between [0..1] and [-1..1] before being denormalized to integer values?

For integer types (see VertexElement.IsIntegerType), the input values are shifted…​
…​from [0..1] to [-1..1] for signed types.
…​from [-1..1] to [0..1] for unsigned types.

The GPU will not perform automatic reverse shifting. This must be done by the GPU program.

This flag implies Normalize.