This patch adds a CMake option "WITH_CYCLES_MIS_DEBUG" which builds cycles with a feature that allows debugging/selecting the direct-light sampling strategy.
The three options are:
fwd: forward path tracing (e.g., via BSDF or phase function)
nee: next-event estimation
mis: a multiple importance sampling combination of the previous two methods
Such a feature is useful for debugging light different sampling, evaluation, and pdf methods (e.g., for light sources and BSDFs).
The following example shows the classroom scene ideally all images should look the same:
{F11773869}
This figure visualizes multiple problems with the light sources (e.g., nee and the ceiling over the lamps)