Taos API Reference
    Preparing search index...

    Class OceanPass

    Hierarchy (View Summary)

    • Pass<OceanPassDeps, OceanPassOutputs>
      • OceanPass
    Index

    Properties

    name: "OceanPass" = 'OceanPass'

    Human-readable identifier used in graph node labels and error messages.

    Accessors

    Methods

    • Analytical seafloor Y (constant, world units). The fragment shader combines this with the rendered scene depth so depth fog reaches true deep-water blue out at the horizon even when no terrain is below the ocean.

      Parameters

      • y: number

      Returns void

    • Toggle the wireframe overlay over the surface — shows the LOD chunk tessellation (grid + diagonals) so you can see how the Interior + Rings + CDLOD morph fit together.

      Parameters

      • on: boolean

      Returns void

    • Seabed depth-cache region the fragment's shallow scatter colour samples. size <= 0 disables (hybrid scene-depth fallback).

      Parameters

      • centerX: number
      • centerZ: number
      • size: number

      Returns void

    • Directional CSM cascades (cascade mode, ≤ 4) — soft term darkens the scatter/SSS by strength, hard term gates sun specular, caustics and foam sun-diffuse. Pass null to disable shadow sampling.

      Parameters

      • cascades: readonly CascadeData[] | null
      • strength: number = 0.8

      Returns void

    • Atmosphere hookups: skyViewEnabled switches the reflection fallback to the sky-view LUT; aerialMaxDist > 0 switches the distance haze to the aerial froxel volume (pass the SAME maxDist the volume was marched with — see DeferredLightingPass's aerial params).

      Parameters

      • skyViewEnabled: boolean
      • aerialMaxDist: number
      • aerialMaxOpacity: number

      Returns void

    • CPU mirror of the shader's seaLevelOffset() — the sea-level region + segment offset (m) at a world XZ. Used for the local water level under the camera (altitude LOD zoom, underwater culling) and for gameplay water queries (a swimming character on a river).

      Parameters

      • x: number
      • z: number

      Returns number

    • Conservative per-frame displacement bounds (world m) — expand the culling AABBs so choppy/displaced water isn't culled while its geometry still reaches into the view (Crest's ExpandBoundsForDisplacements). The host feature estimates these from the active wave sources each frame.

      Parameters

      • maxHoriz: number
      • maxVert: number

      Returns void

    • Wire a reflection-probe cube view into the surface fragment's reflection sample. Pass null to fall back to the sky panorama. The view must have dimension: 'cube' — the caller is responsible for slicing a cube-array down to a single cube before passing it in.

      Parameters

      Returns void

    • Insert the pass into graph for one frame. Implementations call graph.addPass(name, type, b => { ... }) exactly once and use the supplied PassBuilder to declare reads, writes, transient resources, and the execute callback.

      Parameters

      • graph: RenderGraph

        Graph being built this frame.

      • deps: OceanPassDeps

        Pass-specific dependency record (handles, scene data, etc.).

      Returns OceanPassOutputs

      Pass-specific output record (typically a set of handles downstream passes will consume).