.. _bsdf-mqdiffuse:

Measured quasi-diffuse material (:monosp:`mqdiffuse`)
-----------------------------------------------------

.. pluginparameters::

 * - filename
   - |string|
   - Filename of the volume to be loaded.

 * - grid
   - :monosp:`VolumeGrid object`
   - When creating a grid volume at runtime, *e.g.* from Python or C++,
     an existing ``VolumeGrid`` instance can be passed directly rather than
     loading it from the filesystem with :paramtype:`filename`.

 * - accel
   - |bool|
   - Hardware acceleration features can be used in CUDA mode. These features can
     cause small differences as hardware interpolation methods typically have a
     loss of precision (not exactly 32-bit arithmetic). (Default: true)

This plugin models the reflection of light by opaque materials with a behaviour
close to diffuse, *i.e* with no strong scattering lobe. Assumptions are as
follows:

* The material is isotropic. Consequently, only the azimuth difference matters.
* The material is gray. Consequently, no spectral dimension is used.

The data dimension order is (``cos_theta_o``, ``phi_d``, ``cos_theta_i``).
The sampling routine is uniform cosine-weighted (*i.e.* the same as for the
``diffuse`` plugin).

.. warning::
   Table values are not checked internally: ensuring that the data is consistent
   (*e.g* that the corresponding reflectance is not greater than 1) is the
   user's responsibility.