diff options
author | Nathan Vegdahl <cessen> | 2022-09-02 18:32:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-02 18:36:58 +0300 |
commit | 49ca810bf302fdf48e37527d1f8d160fcbd958d2 (patch) | |
tree | aa2d11f49bf7aa6278b2b3db68ba3f4b8fe5e062 /intern/cycles/kernel/film | |
parent | 4bbbba5bc2fdcd5848376d06eb925060f0d1aebd (diff) |
Cycles: enable adaptive sampling for Sobol-Burley
This uses the same sample classification approach as used for PMJ,
because it turns out to also work equally well with Sobol-Burley.
This also implements a fallback (random classification) that should
work "okay" for other samplers, though there are no other samplers
at the moment.
Differential Revision: https://developer.blender.org/D15845
Diffstat (limited to 'intern/cycles/kernel/film')
-rw-r--r-- | intern/cycles/kernel/film/light_passes.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/intern/cycles/kernel/film/light_passes.h b/intern/cycles/kernel/film/light_passes.h index 5c306e8f088..b45b5305119 100644 --- a/intern/cycles/kernel/film/light_passes.h +++ b/intern/cycles/kernel/film/light_passes.h @@ -147,16 +147,16 @@ ccl_device void film_write_adaptive_buffer(KernelGlobals kg, const Spectrum contribution, ccl_global float *ccl_restrict buffer) { - /* Adaptive Sampling. Fill the additional buffer with the odd samples and calculate our stopping - * criteria. This is the heuristic from "A hierarchical automatic stopping condition for Monte - * Carlo global illumination" except that here it is applied per pixel and not in hierarchical - * tiles. */ + /* Adaptive Sampling. Fill the additional buffer with only one half of the samples and + * calculate our stopping criteria. This is the heuristic from "A hierarchical automatic + * stopping condition for Monte Carlo global illumination" except that here it is applied + * per pixel and not in hierarchical tiles. */ if (kernel_data.film.pass_adaptive_aux_buffer == PASS_UNUSED) { return; } - if (sample_is_even(kernel_data.integrator.sampling_pattern, sample)) { + if (sample_is_class_A(kernel_data.integrator.sampling_pattern, sample)) { const float3 contribution_rgb = spectrum_to_rgb(contribution); film_write_pass_float4(buffer + kernel_data.film.pass_adaptive_aux_buffer, |