@equinor/videx-3d
    Preparing search index...

    Class OceanVolumeMaterial

    OIT-compatible water-body (volume) material for the side walls of an ocean box. Shades the walls as a transparent, depth-tinted blue body (a fog-like tint that builds up with view distance), so the interior reads as water both when the camera is inside the box and when looking in from outside. Rendered double-sided so the walls are visible from either side. Shares the surface's deep and shallow colours so the body matches the surface.

    The wall's top ring follows the same spectral wave displacement as the ocean surface (tapered to zero at the sea bed) so the rim stays sealed when vertex displacement is enabled. Share the surface's wave tables via OceanVolumeMaterial.setWaveTables so the walls move in lock-step.

    Wired for the OITRenderPass via attachOitVariants (variants share this material's uniforms by reference, so animated uniforms stay live).

    Hierarchy

    • ShaderMaterial
      • OceanVolumeMaterial
    Index

    Constructors

    Properties

    isOceanVolumeMaterial: boolean = true

    Accessors

    Methods

    • Point this material's wave-component uniform arrays at the surface material's tables (by reference) so the displaced wall top ring tracks the surface waves with no extra per-frame work. The surface mutates those Vector4s in place when the sea state changes, so the walls update for free.

      Parameters

      • waveA: Vector4[]
      • waveB: Vector4[]

      Returns void