public sealed class WaterMeshRendererDraws every zone's surface into the two planes the water pass reads.
Remarks
[35 § D4](../../docs/plan/35-water.md#d4-the-surface-is-the-terrains-quadtree-with-a-different-height-source), and the node that makes a wet pixel possible at all. Without it nothing writes WaterSurface or WaterNormal, so § D8's !Water reads a cleared mask, finds no coverage anywhere and passes the frame through unchanged — a water stack that is wired, tested and invisible.
It runs before !Copy and !Water, and after the opaque pass. The order is what the two planes are for: the surface has to be rasterised against the scene's own depth so a lake behind a hill does not draw over it, and the composite has to have both planes before it integrates anything.
⚠ One WaterSurfacePass per zone, not one per frame. A zone owns a window, a field, an info texture and a patch buffer; sharing a pass between two would mean re-uploading both windows every time either moved. Zones that disappear from the fold have their resources dropped at the next build, which is what keeps a level that streams a zone out from leaking a megabyte of staging per visit.
Fields and properties (19)
public required string SurfaceThe surface plane it writes: device depth in r, coverage in g.
public required string NormalThe normal plane: the surface's world normal in xyz and its foam in a.
public required string SceneDepthThe opaque scene's depth, which the surface is tested against and never writes.
public RenderView? ViewThe view the patches are selected for.
public WaterZoneSystem? ZonesWhere the zones and their fields come from.
public float WaterTimeThe simulation's water time, in seconds.
public int GridQuadsHow many quads the shared grid patch spans.
public TerrainLodRanges RangesWhere each level takes over, and where each one morphs.
public float FarDistanceHow far past a window the far skirt reaches, in metres.
public float EdgeFadeHow wide the band is over which the waves fade at a window's edge, in metres.
public WaterMeshSettings SettingsThe shoreline, foam and rest-height numbers the shader's block carries.
public EffectPipelineDescriber? ModulesWhere shader modules come from. Set before the first frame that builds.
public SamplerCache? SamplersWhere samplers come from, shared so a frame does not exhaust the device's supply.
public IGraphicsDevice? DeviceThe device its pipelines, buffers and textures are created on.
public int ZonesDrawnHow many zones the last frame drew.
public int PatchesDrawnHow many patches they selected between them.
public int DroppedPatchesAnd how many they had to drop. ⚠ Non-zero is a hole in the water.
public int BuildCountHow many frames have declared the pass.
public IEnumerable<WaterMeshRenderer.WaterZoneDraw> DrawsWhat each zone drew last frame.
Methods (2)
protected override void Build(GraphicsCompositor compositor, CompositorFrame frame)Declares this node's render-graph passes.
public void Dispose()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Used by (5)
- WaterDebugDrawVixen.Rendering.Water
- WaterHorizonImageTestsVixen.Graphics.Golden.Tests
- WaterMeshOverlayVixen.Rendering.Water
- WaterRendererFactoryVixen.Rendering.Water
- WaterSurfacePassTestsVixen.Rendering.Water.Tests