diff options
author | Nathan Vegdahl <cessen> | 2022-08-18 21:45:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-08-19 17:27:22 +0300 |
commit | a06c9b5ca8364f95bbfa6c3bedd23307e6817437 (patch) | |
tree | bb23eb93b53f798d40f1f0eae0b52f7444c49de1 /intern/cycles/scene | |
parent | 35a41a49a8e0c77e3efce80609fb8af9b20e9768 (diff) |
Cycles: add Sobol-Burley sampling pattern
Based on the paper "Practical Hash-based Owen Scrambling" by Brent Burley,
2020, Journal of Computer Graphics Techniques.
It is distinct from the existing Sobol sampler in two important ways:
* It is Owen scrambled, which gives it a much better convergence rate in many
situations.
* It uses padding for higher dimensions, rather than using higher Sobol
dimensions directly. In practice this is advantagous because high-dimensional
Sobol sequences have holes in their sampling patterns that don't resolve
until an unreasonable number of samples are taken. (See Burley's paper for
details.)
The pattern reduces noise in some benchmark scenes, however it is also slower,
particularly on the CPU. So for now Progressive Multi-Jittered sampling remains
the default.
Differential Revision: https://developer.blender.org/D15679
Diffstat (limited to 'intern/cycles/scene')
-rw-r--r-- | intern/cycles/scene/integrator.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/scene/integrator.cpp b/intern/cycles/scene/integrator.cpp index aa11004fb48..58daf417ab0 100644 --- a/intern/cycles/scene/integrator.cpp +++ b/intern/cycles/scene/integrator.cpp @@ -89,6 +89,7 @@ NODE_DEFINE(Integrator) static NodeEnum sampling_pattern_enum; sampling_pattern_enum.insert("sobol", SAMPLING_PATTERN_SOBOL); sampling_pattern_enum.insert("pmj", SAMPLING_PATTERN_PMJ); + sampling_pattern_enum.insert("sobol_burley", SAMPLING_PATTERN_SOBOL_BURLEY); SOCKET_ENUM(sampling_pattern, "Sampling Pattern", sampling_pattern_enum, SAMPLING_PATTERN_SOBOL); SOCKET_FLOAT(scrambling_distance, "Scrambling Distance", 1.0f); @@ -260,7 +261,7 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene dscene->sample_pattern_lut.copy_to_device(); } - else { + else if (kintegrator->sampling_pattern == SAMPLING_PATTERN_PMJ) { constexpr int sequence_size = NUM_PMJ_SAMPLES; constexpr int num_sequences = NUM_PMJ_PATTERNS; float2 *directions = (float2 *)dscene->sample_pattern_lut.alloc(sequence_size * |