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:
Diffstat (limited to 'intern/cycles/render/session.cpp')
-rw-r--r--intern/cycles/render/session.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp
index acf9ca68889..ae0a2cf863a 100644
--- a/intern/cycles/render/session.cpp
+++ b/intern/cycles/render/session.cpp
@@ -908,9 +908,6 @@ void Session::set_samples(int samples)
params.samples = samples;
tile_manager.set_samples(samples);
- {
- thread_scoped_lock pause_lock(pause_mutex);
- }
pause_cond.notify_all();
}
}
@@ -946,6 +943,15 @@ void Session::set_denoising(bool denoising, bool optix_denoising)
tile_manager.schedule_denoising = denoising && !buffers;
}
+void Session::set_denoising_start_sample(int sample)
+{
+ if (sample != params.denoising_start_sample) {
+ params.denoising_start_sample = sample;
+
+ pause_cond.notify_all();
+ }
+}
+
void Session::wait()
{
if (session_thread) {
@@ -1110,8 +1116,8 @@ void Session::denoise()
return;
}
- /* It can happen that denoising was already enabled, but the scene still needs an update. */
- if (scene->film->need_update || !scene->film->denoising_data_offset) {
+ /* Do not denoise viewport until the sample at which denoising should start is reached. */
+ if (!params.background && tile_manager.state.sample < params.denoising_start_sample) {
return;
}
@@ -1122,6 +1128,11 @@ void Session::denoise()
return;
}
+ /* It can happen that denoising was already enabled, but the scene still needs an update. */
+ if (scene->film->need_update || !scene->film->denoising_data_offset) {
+ return;
+ }
+
/* Add separate denoising task. */
DeviceTask task(DeviceTask::DENOISE);