Vixen
c7401864
csharp
public record class WaterAsset

The water pass, as a document names it.

Read the guide page for this →

Remarks

A node in a .vxcompositor, which means a project that has no water does not pay for the copy — [35 § D8](../../docs/plan/35-water.md#d8-the-surface-is-a-pass-between-lighting-and-translucency-and-its-reflections-are-l5s). The !Copy ahead of it is culled with its target when nothing reads the snapshot, so a document carrying both costs nothing in a scene where no surface pass ran.

⚠ Behind must name a copy and not the scene colour itself. Reading the target a pass is writing is undefined behaviour, and the whole reason § B1 called the copy the blocker rather than the pass. The graph refuses the case where the two names are equal — see WaterRenderer — because a document that made that mistake would otherwise render on one driver and not another.

Fields and properties (20)

  • public string Name

    The node's name, for debug groups and for a human reading the file.

  • public bool Enabled

    Whether the node runs.

  • public string Output

    The target it writes — the frame's scene colour.

  • public string Behind

    The copy of the frame so far, which is what is behind the water.

  • public string SceneDepth

    The opaque scene's depth.

  • public string Surface

    The surface plane: device depth in r, coverage in g.

  • public string Normal

    The surface's world normal in xyz and its foam in a.

  • public string Reflections

    Doc 19 § L5's reflection plane, or empty to compile the variant without it.

  • public string View

    Which view's camera the two distances are reconstructed against.

  • public Vector3 Scattering

    How much light the medium scatters out of a ray per metre, per channel.

  • public Vector3 Absorption

    How much it absorbs per metre, per channel.

  • public float PhaseG

    Henyey–Greenstein anisotropy. Water is forward-scattering, around 0.7.

  • public Vector3 BehindScale

    § D8's scale on what is behind the water. One is the physical answer.

  • public Vector3 SunColour

    The radiance the volume scatters.

  • public Vector3 SunDirection

    Which way the light travels.

  • public Vector3 SkyColour

    What arrives from the whole sky. ⚠ Without it, deep water is black.

  • public float SurfaceF0

    Water against air. ⚠ Not a base colour.

  • public Vector3 FoamColour

    What foam is where the surface plane says there is some.

  • public bool Foam

    Whether foam is blended over the result at all.

  • public bool Tiled

    Whether the pass runs over the tiles that have water rather than over the screen.

Used by (5)

  • TypeRegistrationVixen.Rendering.Water
  • UnderwaterPassTestsVixen.Rendering.Water.Tests
  • Vixen_Rendering_Water_WaterAssetSerializerVixen.Rendering.Water
  • WaterPassTestsVixen.Rendering.Water.Tests
  • WaterRendererFactoryVixen.Rendering.Water