Vixen
caa30e12

WaterConstants

struct
csharp
public struct WaterConstants

The values of Water'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 Matrix4x4 InverseViewProjection

    inverseViewProjection at byte 0.

  • public Vector3 CameraPosition

    cameraPosition at byte 64.

  • public Vector3 Scattering

    scattering at byte 80.

  • public Vector3 Absorption

    absorption at byte 96.

  • public float PhaseG

    phaseG at byte 108.

  • public Vector3 BehindScale

    behindScale at byte 112.

  • public Vector3 SunColour

    sunColour at byte 128.

  • public Vector3 SunDirection

    sunDirection at byte 144.

  • public Vector3 SkyColour

    skyColour at byte 160.

  • public float SurfaceF0

    surfaceF0 at byte 172.

  • public Vector3 FoamColour

    foamColour at byte 176.

  • public Int2 TileCount

    tileCount at byte 192.

  • public Int2 TargetSize

    targetSize at byte 200.

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