diff options
author | Sebastian Herholz <sherholz> | 2021-11-17 19:26:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-11-17 20:03:56 +0300 |
commit | d9bc8f189cc36cc55082cfd7ad8845e96eb062e3 (patch) | |
tree | 0fe69c7ae01d5fa3dd68e5d719bae9a757f4ec83 /intern/cycles/kernel/types.h | |
parent | 063ad8635ec87a490d6fc02c937387a3c6673b08 (diff) |
Cycles: add build option to enable a debugging feature for MIS
This patch adds a CMake option "WITH_CYCLES_DEBUG" which builds cycles with
a feature that allows debugging/selecting the direct-light sampling strategy.
The same option may later be used to add other debugging features that could
affect performance in release builds.
The three options are:
* Forward path tracing (e.g., via BSDF or phase function)
* Next-event estimation
* 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).
Differential Revision: https://developer.blender.org/D13152
Diffstat (limited to 'intern/cycles/kernel/types.h')
-rw-r--r-- | intern/cycles/kernel/types.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h index 74b34524786..e66c3fe49df 100644 --- a/intern/cycles/kernel/types.h +++ b/intern/cycles/kernel/types.h @@ -481,6 +481,16 @@ enum PanoramaType { PANORAMA_NUM_TYPES, }; +/* Direct Light Sampling */ + +enum DirectLightSamplingType { + DIRECT_LIGHT_SAMPLING_MIS = 0, + DIRECT_LIGHT_SAMPLING_FORWARD = 1, + DIRECT_LIGHT_SAMPLING_NEE = 2, + + DIRECT_LIGHT_SAMPLING_NUM, +}; + /* Differential */ typedef struct differential3 { @@ -1193,8 +1203,11 @@ typedef struct KernelIntegrator { /* Closure filter. */ int filter_closures; + /* MIS debuging */ + int direct_light_sampling_type; + /* padding */ - int pad1, pad2, pad3; + int pad1, pad2; } KernelIntegrator; static_assert_align(KernelIntegrator, 16); |