Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2020-04-07 20:43:51 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-04-07 21:29:48 +0300
commit53981c7fb6fdd9973e40f81f867f25d10540c1d1 (patch)
tree84572c33af5bb0c343f6a2928b135041bb8cb3b3 /intern/cycles/render/integrator.cpp
parent7b4b07a7ddc874efd11b3932f152c7136d720f9c (diff)
Cleanup: refactor adaptive sampling to more easily change some parameters
No functional changes yet, this is work towards making CPU and GPU results match more closely.
Diffstat (limited to 'intern/cycles/render/integrator.cpp')
-rw-r--r--intern/cycles/render/integrator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/render/integrator.cpp b/intern/cycles/render/integrator.cpp
index 2f9d088899e..d4beb06e57b 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -190,6 +190,13 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
else {
kintegrator->adaptive_min_samples = max(4, adaptive_min_samples);
}
+
+ kintegrator->adaptive_step = 4;
+ kintegrator->adaptive_stop_per_sample = device->info.has_adaptive_stop_per_sample;
+
+ /* Adaptive step must be a power of two for bitwise operations to work. */
+ assert((kintegrator->adaptive_step & (kintegrator->adaptive_step - 1)) == 0);
+
if (aa_samples > 0 && adaptive_threshold == 0.0f) {
kintegrator->adaptive_threshold = max(0.001f, 1.0f / (float)aa_samples);
VLOG(1) << "Cycles adaptive sampling: automatic threshold = "