UnderwaterConstants
public struct UnderwaterConstantsThe values of Underwater'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 (20)
public Matrix4x4 InverseViewProjectioninverseViewProjection at byte 0.
public Vector3 CameraPositioncameraPosition at byte 64.
public Vector3 SurfacePointsurfacePoint at byte 80.
public Vector3 SurfaceNormalsurfaceNormal at byte 96.
public float WaterlineFeatherwaterlineFeather at byte 108.
public float Submersionsubmersion at byte 112.
public Vector3 Scatteringscattering at byte 128.
public Vector3 Absorptionabsorption at byte 144.
public float PhaseGphaseG at byte 156.
public Vector3 SkyColourskyColour at byte 160.
public Vector3 BehindScalebehindScale at byte 176.
public float DistortionAmountdistortionAmount at byte 188.
public float DistortionScaledistortionScale at byte 192.
public float DistortionSpeeddistortionSpeed at byte 196.
public float CausticAmountcausticAmount at byte 200.
public float CausticScalecausticScale at byte 204.
public float CausticSpeedcausticSpeed at byte 208.
public float CausticDepthcausticDepth at byte 212.
public float WaterTimewaterTime at byte 216.
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.