Commit: c010abd4cad96a11954bad69a805882922d116c2
Author: Alaska
Date:   Mon Sep 20 14:09:36 2021 +0200
Branches: cycles-x
https://developer.blender.org/rBc010abd4cad96a11954bad69a805882922d116c2

Fix incorrect auto minimum samples for adaptive sampling

The comment did not match the implementation.

Differential Revision: https://developer.blender.org/D12561

===================================================================

M       intern/cycles/render/integrator.cpp

===================================================================

diff --git a/intern/cycles/render/integrator.cpp 
b/intern/cycles/render/integrator.cpp
index 9188a52d9be..d74d14242bb 100644
--- a/intern/cycles/render/integrator.cpp
+++ b/intern/cycles/render/integrator.cpp
@@ -287,8 +287,10 @@ AdaptiveSampling Integrator::get_adaptive_sampling() const
   }
 
   if (adaptive_sampling.threshold > 0 && adaptive_min_samples == 0) {
-    /* Threshold 0.1 -> 32, 0.01 -> 64, 0.001 -> 128. */
-    const int min_samples = (int)ceilf(16.0f / 
sqrtf(adaptive_sampling.threshold * 0.3f));
+    /* Threshold 0.1 -> 32, 0.01 -> 64, 0.001 -> 128.
+     * This is highly scene dependent, we make a guess that seemed to work well
+     * in various test scenes. */
+    const int min_samples = (int)ceilf(16.0f / 
powf(adaptive_sampling.threshold, 0.3f));
     adaptive_sampling.min_samples = max(4, min_samples);
     VLOG(1) << "Cycles adaptive sampling: automatic min samples = "
             << adaptive_sampling.min_samples;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to