Vixen
02b45cc4

GrassScatterConstants

struct
csharp
public struct GrassScatterConstants

The values of GrassScatter'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 (14)

  • public int WeightChannel

    weightChannel at byte 0.

  • public Vector2 HeightMapSize

    heightMapSize at byte 8.

  • public Vector2 HeightRange

    heightRange at byte 16.

  • public float MetresPerQuad

    metresPerQuad at byte 24.

  • public Vector3 TerrainOrigin

    terrainOrigin at byte 32.

  • public float CellSize

    cellSize at byte 44.

  • public int GridSide

    gridSide at byte 48.

  • public float Jitter

    jitter at byte 52.

  • public Vector2 WeightRange

    weightRange at byte 56.

  • public Vector2 ScaleRange

    scaleRange at byte 64.

  • public float AlignToNormal

    alignToNormal at byte 72.

  • public float MaxSlope

    maxSlope at byte 76.

  • public float DensityScale

    densityScale at byte 80.

  • 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)

  • GrassDispatchVixen.Rendering.Terrain