.. _plugin-bsdf-rpv:

Rahman Pinty Verstraete reflection model (:monosp:`rpv`)
--------------------------------------------------------

.. pluginparameters::

 * - rho_0
   - |spectrum| or |texture|
   - :math:`\rho_0 \ge 0`. Default: 0.1
   - |exposed| |differentiable|

 * - k
   - |spectrum| or |texture|
   - :math:`k \in \mathbb{R}`. Default: 0.1
   - |exposed| |differentiable|

 * - g
   - |spectrum| or |texture|
   - :math:`-1 \le g \le 1`. Default: 0.0
   - |exposed| |differentiable|

 * - rho_c
   - |spectrum| or |texture|
   - Default: Equal to `rho_0`
   - |exposed| |differentiable|

This plugin implements the reflection model proposed by
:cite:`Rahman1993CoupledSurfaceatmosphereReflectance`.

Apart from floating point values, model parameters can be defined by nested or
referenced textures which are then mapped onto the shape based on its UV
parameterization.

This plugin also supports the most common extension of the RPV model to four
parameters, namely the :math:`\rho_c` extension, as used in
:cite:`Widlowski2006Rayspread`.

For the fundamental formulae defining the RPV 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 RPV material with monochromatic parameters:

.. tab-set-code::

    .. code-block:: python

        "type": "rpv",
        "rho_0": 0.02,
        "k": 0.3,
        "g": -0.12

    .. code-block:: xml

        <bsdf type="rpv">
            <float name="rho_0" value="0.02"/>
            <float name="k" value="0.3"/>
            <float name="g" value="-0.12"/>
        </bsdf>