.. _plugin-bsdf-ocean_legacy:

(Legacy 6S) Oceanic reflection model (:monosp:`ocean-legacy`)
-------------------------------------------------------------

.. pluginparameters::
 :extra-rows: 8

 * - wavelength
   - |float|
   - :math:`k \in [200, 4000]` nm.
   - Specifies the wavelength at which to evaluate the oceanic reflectance.

 * - wind_speed
   - |float|
   - :math:`k \in [0, 37.54]` m/s.
   - Specifies the wind speed at which to evaluate the oceanic reflectance
     (Default: :monosp:`0.1 m/s`).

 * - wind_direction
   - |float|
   - :math:`k \in [0, 360]` deg.
   - Specifies the wind direction at which to evaluate the oceanic reflectance
     in North Left convention (Default: :monosp:`0. deg`).

 * - chlorinity
   - |float|
   - Specifies the chlorinity of the water at which to evaluate the oceanic
     reflectance (Default: :monosp:`19. g/kg`).

 * - pigmentation
   - |float|
   - :math:`k \in [0.3, \infty]`.
   - Specifies the pigmentation of the water at which to evaluate the oceanic
     reflectance (Default: :monosp:`0.3 mg/m^3`).

 * - shadowing
   - |bool|
   - Indicates whether evaluation accounts for the shadowing-masking term.
     (Default: :monosp:`true`).

 * - component
   - |int|
   - Debug: specifies which component of the oceanic reflection model to
     evaluate. Default: 0 Component 0 is used to evaluate the total oceanic
     reflectance. Component 1 evaluates the whitecap reflectance. Component 2
     evaluates the sun glint reflectance. Component 3 evaluates the underlight
     reflectance. Component 4 evaluates the whitecap and underlight reflectance
     together.

 * - coverage
   - |float|
   - Fraction of the surface occupied by whitecaps. Modifying this parameter has
     no effect: it is automatically computed from the wind speed.

This plugin implements the oceanic reflection model originally
implemented in the 6S radiative transfer model. Note that this model
is monochromatic.

For the fundamental formulae defining the oceanic reflectance model, please
refer to the Eradiate Scientific Handbook.

Note that this material is one-sided---that is, observed from the
back side, it will be completely black. If this is undesirable,
consider using the ``twosided`` BSDF adapter plugin.
The following snippet describes an oceanic surface material with monochromatic
parameters:

.. warning::
    The wind direction is given in degrees and follows the North Left convention
    as in 6SV.

.. tab-set-code::

    .. code-block:: python

        "type": "ocean_legacy",
        "wavelength": 550,
        "wind_speed": 10,
        "wind_direction": 0,
        "chlorinity": 19,
        "pigmentation": 0.3,
        "shadowing": True,
        "component": 0,

    .. code-block:: xml

        <bsdf type="ocean_legacy">
            <float name="wavelength" value="550"/>
            <float name="wind_speed" value="10"/>
            <float name="wind_direction" value="0"/>
            <float name="chlorinity" value="19"/>
            <float name="pigmentation" value="0.3"/>
            <float name="shadowing" value="True"/>
            <int name="component" value="0"/>
        </bsdf>