Vixen
caa30e12

UnderwaterConstants

struct
csharp
public struct UnderwaterConstants

The values of Underwater'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 (20)

  • public Matrix4x4 InverseViewProjection

    inverseViewProjection at byte 0.

  • public Vector3 CameraPosition

    cameraPosition at byte 64.

  • public Vector3 SurfacePoint

    surfacePoint at byte 80.

  • public Vector3 SurfaceNormal

    surfaceNormal at byte 96.

  • public float WaterlineFeather

    waterlineFeather at byte 108.

  • public float Submersion

    submersion at byte 112.

  • public Vector3 Scattering

    scattering at byte 128.

  • public Vector3 Absorption

    absorption at byte 144.

  • public float PhaseG

    phaseG at byte 156.

  • public Vector3 SkyColour

    skyColour at byte 160.

  • public Vector3 BehindScale

    behindScale at byte 176.

  • public float DistortionAmount

    distortionAmount at byte 188.

  • public float DistortionScale

    distortionScale at byte 192.

  • public float DistortionSpeed

    distortionSpeed at byte 196.

  • public float CausticAmount

    causticAmount at byte 200.

  • public float CausticScale

    causticScale at byte 204.

  • public float CausticSpeed

    causticSpeed at byte 208.

  • public float CausticDepth

    causticDepth at byte 212.

  • public float WaterTime

    waterTime at byte 216.

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