Vixen
c7401864

WaterMeshPerMaterialConstants

struct
csharp
public struct WaterMeshPerMaterialConstants

The values of WaterMesh'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 (11)

  • public Matrix4x4 ViewProjection

    viewProjection at byte 0.

  • public Vector2 WindowOrigin

    windowOrigin at byte 64.

  • public float WindowExtent

    windowExtent at byte 72.

  • public float AttenuationDepth

    attenuationDepth at byte 76.

  • public float WaterTime

    waterTime at byte 80.

  • public float EdgeFade

    edgeFade at byte 84.

  • public float RestHeight

    restHeight at byte 88.

  • public float ShoreDepth

    shoreDepth at byte 92.

  • public float FoamDepth

    foamDepth at byte 96.

  • public float FoamCrest

    foamCrest at byte 100.

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

  • WaterSurfacePassVixen.Rendering.Water