WaterConstants
csharp
public struct WaterConstantsThe values of Water's uniform block, in C# types.
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 InverseViewProjectioninverseViewProjection at byte 0.
public Vector3 CameraPositioncameraPosition at byte 64.
public Vector3 Scatteringscattering at byte 80.
public Vector3 Absorptionabsorption at byte 96.
public float PhaseGphaseG at byte 108.
public Vector3 BehindScalebehindScale at byte 112.
public Vector3 SunColoursunColour at byte 128.
public Vector3 SunDirectionsunDirection at byte 144.
public Vector3 SkyColourskyColour at byte 160.
public float SurfaceF0surfaceF0 at byte 172.
public Vector3 FoamColourfoamColour at byte 176.
public Int2 TileCounttileCount at byte 192.
public Int2 TargetSizetargetSize at byte 200.
public const int SizeThe block's size in bytes.
Methods (1)
public readonly void Write(Span<byte> buffer)Writes every value into at its baked offset.