diff options
author | William Leeson <leesonw> | 2021-10-26 09:30:15 +0300 |
---|---|---|
committer | William Leeson <william@blender.org> | 2021-10-26 17:11:27 +0300 |
commit | 366262bef5426fa98e75c96a1562dd16001fba26 (patch) | |
tree | 80a4fd4c204d1e48bc25dd42bf93c6923e5959c4 /intern/cycles/scene | |
parent | 4094868f7301ed06e6fd0710d1e9193796eb857d (diff) |
Distance Scrambling for for Cycles X - Sobol version
Cycles:Distance Scrambling for Cycles Sobol Sampler
This option implements micro jittering an is based on the INRIA
research paper [[ https://hal.inria.fr/hal-01325702/document | on micro jittering ]]
and work by Lukas Stockner for implementing the scrambling distance.
It works by controlling the correlation between pixels by either using
a user supplied value or an adaptive algorithm to limit the maximum
deviation of the sample values between pixels.
This is a follow up of https://developer.blender.org/D12316
The PMJ version can be found here: https://developer.blender.org/D12511
Reviewed By: leesonw
Differential Revision: https://developer.blender.org/D12318
Diffstat (limited to 'intern/cycles/scene')
-rw-r--r-- | intern/cycles/scene/integrator.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/scene/integrator.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/scene/integrator.cpp b/intern/cycles/scene/integrator.cpp index 3e795b30e7f..e9ff868c3fc 100644 --- a/intern/cycles/scene/integrator.cpp +++ b/intern/cycles/scene/integrator.cpp @@ -81,6 +81,7 @@ NODE_DEFINE(Integrator) sampling_pattern_enum.insert("sobol", SAMPLING_PATTERN_SOBOL); sampling_pattern_enum.insert("pmj", SAMPLING_PATTERN_PMJ); SOCKET_ENUM(sampling_pattern, "Sampling Pattern", sampling_pattern_enum, SAMPLING_PATTERN_SOBOL); + SOCKET_FLOAT(scrambling_distance, "Scrambling Distance", 1.0f); static NodeEnum denoiser_type_enum; denoiser_type_enum.insert("optix", DENOISER_OPTIX); @@ -192,6 +193,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene sample_clamp_indirect * 3.0f; kintegrator->sampling_pattern = new_sampling_pattern; + kintegrator->scrambling_distance = scrambling_distance; if (light_sampling_threshold > 0.0f) { kintegrator->light_inv_rr_threshold = 1.0f / light_sampling_threshold; diff --git a/intern/cycles/scene/integrator.h b/intern/cycles/scene/integrator.h index c380203f4f3..75764bcdedc 100644 --- a/intern/cycles/scene/integrator.h +++ b/intern/cycles/scene/integrator.h @@ -76,6 +76,7 @@ class Integrator : public Node { NODE_SOCKET_API(float, adaptive_threshold) NODE_SOCKET_API(SamplingPattern, sampling_pattern) + NODE_SOCKET_API(float, scrambling_distance) NODE_SOCKET_API(bool, use_denoise); NODE_SOCKET_API(DenoiserType, denoiser_type); |