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

    Class OceanMaterial

    Stylized, OIT-compatible ocean surface material.

    The wave field is a discrete set of directional components sampled from a JONSWAP spectrum tuned for the North Sea (gamma = 3.3), driven by a single physical input: the wind speed (m/s, U10). Peak frequency, wavelength and significant wave height follow the standard Pierson-Moskowitz/JONSWAP relations, so the wave sizes and spacing are physically plausible (e.g. U = 10 m/s gives Hs ~ 2.1 m and a peak wavelength ~ 88 m). The spectrum is sampled on the CPU whenever the wind changes and uploaded as uniform arrays; the shaders just sum the components.

    All wave/foam animation is evaluated in world X/Z space so it tiles seamlessly across patched geometry. The material is wired for the OITRenderPass via attachOitVariants; because its OIT variants share this material's uniforms object by reference, animated uniforms (time, wind, colours) stay live through every transparency pass.

    Hierarchy

    • ShaderMaterial
      • OceanMaterial
    Index

    Constructors

    Properties

    isOceanMaterial: boolean = true

    Accessors

    • get tonalScale(): number

      Approximate size of the large-scale tonal variation patches, in kilometers. Larger values give broader, slower-changing current/slick fields; smaller values break the water up into finer patches.

      Returns number

    • set tonalScale(value: number): void

      Parameters

      • value: number

      Returns void

    • get tonalSharpness(): number

      Crispness of the tonal variation patch boundaries. 0 keeps the soft FBM gradient; higher values (up to 1) narrow the transition band so the currents/slicks read as distinct, well-defined regions.

      Returns number

    • set tonalSharpness(value: number): void

      Parameters

      • value: number

      Returns void

    Methods