Commit: b8f41825e85779bfddad24c76bd3111b0544ecc3
Author: Andrii
Date:   Thu Dec 9 20:54:38 2021 +0100
Branches: master
https://developer.blender.org/rBb8f41825e85779bfddad24c76bd3111b0544ecc3

Fix Cycles wrong adaptive sampling render when using sample offset

Sample offset was not accounted for in the adaptive sampling code and caused
issues, like immediately applied adaptive filtering, with non-zero values.

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

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

M       intern/cycles/integrator/render_scheduler.cpp

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

diff --git a/intern/cycles/integrator/render_scheduler.cpp 
b/intern/cycles/integrator/render_scheduler.cpp
index 4a73955a95f..ec16152d0b9 100644
--- a/intern/cycles/integrator/render_scheduler.cpp
+++ b/intern/cycles/integrator/render_scheduler.cpp
@@ -112,7 +112,7 @@ int RenderScheduler::get_rendered_sample() const
 {
   DCHECK_GT(get_num_rendered_samples(), 0);
 
-  return start_sample_ + get_num_rendered_samples() - 1;
+  return start_sample_ + get_num_rendered_samples() - 1 - sample_offset_;
 }
 
 int RenderScheduler::get_num_rendered_samples() const
@@ -877,7 +877,8 @@ int RenderScheduler::get_num_samples_to_path_trace() const
    * is to ensure that the final render is pixel-matched regardless of how 
many samples per second
    * compute device can do. */
 
-  return adaptive_sampling_.align_samples(path_trace_start_sample, 
num_samples_to_render);
+  return adaptive_sampling_.align_samples(path_trace_start_sample - 
sample_offset_,
+                                          num_samples_to_render);
 }
 
 int RenderScheduler::get_num_samples_during_navigation(int resolution_divider) 
const

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

Reply via email to