Vixen
02b45cc4

GrassConstants

struct
csharp
public struct GrassConstants

The values of Grass'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 (12)

  • public Matrix4x4 ViewProjection

    viewProjection at byte 0.

  • public Vector3 ViewPosition

    viewPosition at byte 64.

  • public float Time

    time at byte 76.

  • public Vector2 WindDirection

    wind.direction at byte 80.

  • public float WindStrength

    wind.strength at byte 88.

  • public float WindFrequency

    wind.frequency at byte 92.

  • public float WindSpeed

    wind.speed at byte 96.

  • public float WindFlutter

    wind.flutter at byte 100.

  • public float WindHeight

    wind.height at byte 104.

  • public Vector2 TintRange

    tintRange at byte 112.

  • public Vector2 FadeRange

    fadeRange at byte 120.

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

  • GrassDrawPassVixen.Rendering.Terrain