diff options
author | Andrii <pembem22> | 2021-12-09 22:54:38 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-09 22:54:41 +0300 |
commit | b8f41825e85779bfddad24c76bd3111b0544ecc3 (patch) | |
tree | 4c967382dc111dc24398861ec8aee5e718156a50 /intern | |
parent | dbd64a559216b0a3d5e9e51ea444bed43094ea92 (diff) |
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
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/integrator/render_scheduler.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 |