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:
authorAndrii <pembem22>2021-11-11 10:57:35 +0300
committerWilliam Leeson <william@blender.org>2021-11-11 11:39:25 +0300
commitc63e735f6b601e662fbb1ed5d7a71293552d6720 (patch)
tree83e7eb2e002067fc7072a63fd3badca9a471f5d8 /intern/cycles/session
parentb8d53b703a4e20b4301e794bf58c9d1fdb65d61b (diff)
Cycles: Add sample offset option
This patch exposes the sampling offset option to Blender. It is located in the "Sampling > Advanced" panel. For example, this can be useful to parallelize rendering and distribute different chunks of samples for each computer to render. --- I also had to add this option to `RenderWork` and `RenderScheduler` classes so that the sample count in the status string can be calculated correctly. Reviewed By: leesonw Differential Revision: https://developer.blender.org/D13086
Diffstat (limited to 'intern/cycles/session')
-rw-r--r--intern/cycles/session/session.cpp3
-rw-r--r--intern/cycles/session/session.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/intern/cycles/session/session.cpp b/intern/cycles/session/session.cpp
index b228939689c..299d731d9f9 100644
--- a/intern/cycles/session/session.cpp
+++ b/intern/cycles/session/session.cpp
@@ -262,6 +262,7 @@ RenderWork Session::run_update_for_next_iteration()
}
render_scheduler_.set_num_samples(params.samples);
+ render_scheduler_.set_start_sample(params.sample_offset);
render_scheduler_.set_time_limit(params.time_limit);
while (have_tiles) {
@@ -397,7 +398,7 @@ void Session::do_delayed_reset()
/* Tile and work scheduling. */
tile_manager_.reset_scheduling(buffer_params_, get_effective_tile_size());
- render_scheduler_.reset(buffer_params_, params.samples);
+ render_scheduler_.reset(buffer_params_, params.samples, params.sample_offset);
/* Passes. */
/* When multiple tiles are used SAMPLE_COUNT pass is used to keep track of possible partial
diff --git a/intern/cycles/session/session.h b/intern/cycles/session/session.h
index 1ec0c6e9bb1..3f73593f008 100644
--- a/intern/cycles/session/session.h
+++ b/intern/cycles/session/session.h
@@ -54,6 +54,7 @@ class SessionParams {
bool experimental;
int samples;
+ int sample_offset;
int pixel_size;
int threads;
@@ -75,6 +76,7 @@ class SessionParams {
experimental = false;
samples = 1024;
+ sample_offset = 0;
pixel_size = 1;
threads = 0;
time_limit = 0.0;