# TerrainVertexData

## Description

`[Flags]`
`enum` `Tinman.AddOns.Export.TerrainVertexData`

Enumeration of vertex data elements.

## Public / Constants

### None

`public` `constant` `None` → `(0:int32)`

No vertex data.

### Position

`public` `constant` `Position` → `(1:int32)`

Vertex positions, in the local coordinate system of the terrain mesh chunk.

```data[N * 3 + 0] = X-coordinate of vertex position
data[N * 3 + 1] = Y-coordinate of vertex position
data[N * 3 + 2] = Z-coordinate of vertex position```

where `N` is the zero-based index of the vertex.

### Normal

`public` `constant` `Normal` → `(2:int32)`

Unit-length vertex normal vectors, in the local coordinate system of the terrain mesh chunk:

```data[N * 3 + 0] = X-component of normal vector
data[N * 3 + 1] = Y-component of normal vector
data[N * 3 + 2] = Z-component of normal vector```

where `N` is the zero-based index of the vertex.

### Tangent

`public` `constant` `Tangent` → `(4:int32)`

Unit-length vertex tangent vectors, in the local coordinate system of the terrain mesh chunk:

```data[N * 3 + 0] = X-component of tangent vector
data[N * 3 + 1] = Y-component of tangent vector
data[N * 3 + 2] = Z-component of tangent vector```

where `N` is the zero-based index of the vertex.

### Bitangent

`public` `constant` `Bitangent` → `(8:int32)`

Unit-length vertex bitangent vectors, in the local coordinate system of the terrain mesh chunk:

```data[N * 3 + 0] = X-component of bitangent vector
data[N * 3 + 1] = Y-component of bitangent vector
data[N * 3 + 2] = Z-component of bitangent vector```

where `N` is the zero-based index of the vertex.

### Albedo

`public` `constant` `Albedo` → `(16:int32)`

Surface albedo (linear sRGB):

```data[N * 3 + 0] = red channel intensity
data[N * 3 + 1] = green channel intensity
data[N * 3 + 2] = blue channel intensity```

where `N` is the zero-based index of the vertex.

### Occlusion

`public` `constant` `Occlusion` → `(32:int32)`

Ambient occlusion (linear, 0 := full ambient occlusion, 1 := no ambient occlusion):

`data[N] = ambient occlusion factor`

where `N` is the zero-based index of the vertex.

### TextureCoordinates

`public` `constant` `TextureCoordinates` → `(64:int32)`

Texture coordinates:

```data[N * 2 + 0] = U-component of texture coordinates
data[N * 2 + 1] = V-component of texture coordinates```

where `N` is the zero-based index of the vertex.

### Materials

`public` `constant` `Materials` → `(128:int32)`

Surface materials:

```data[N * 5 + 0] = packed material IDs
data[N * 5 + 1] = packed material weights```

where `N` is the zero-based index of the vertex.

`public` `constant` `All` → `(255:int32)`