Vixen
02b45cc4

TerrainConstants

struct
csharp
public struct TerrainConstants

The values of Terrain's uniform block, in C# types.

Read the guide page for this →

Remarks

Field order follows the shader's declaration order, not the block's byte order — the two differ wherever std140 inserted padding, and the writer knows the difference.

Fields and properties (8)

  • public Matrix4x4 ViewProjection

    viewProjection at byte 0.

  • public Vector2 HeightMapSize

    heightMapSize at byte 64.

  • public float TileSamples

    tileSamples at byte 72.

  • public float TileQuads

    tileQuads at byte 76.

  • public Vector2 AtlasTiles

    atlasTiles at byte 80.

  • public Vector2 HeightRange

    heightRange at byte 88.

  • public float MetresPerQuad

    metresPerQuad at byte 96.

  • public const int Size

    The block's size in bytes.

Methods (1)

  • public readonly void Write(Span<byte> buffer)

    Writes every value into at its baked offset.

Used by (1)

  • TerrainRendererVixen.Rendering.Terrain