[Bf-blender-cvs] [40d28b40dfd] blender-v3.0-release: Fix black Cycles result when cancelling tiled rendering with shadow catcher

Sergey Sharybin noreply at git.blender.org
Thu Nov 25 09:51:00 CET 2021


Commit: 40d28b40dfd0b0093263947f66fc1760abd55ad6
Author: Sergey Sharybin
Date:   Wed Nov 24 15:52:50 2021 +0100
Branches: blender-v3.0-release
https://developer.blender.org/rB40d28b40dfd0b0093263947f66fc1760abd55ad6

Fix black Cycles result when cancelling tiled rendering with shadow catcher

Noticed when was looking into T93155. Steps to reproduce:

- Open the .blend file from the report
- Hit F12 to start rendering
- After some tiles were rendered hit Esc

The issue is caused by "sticky" cancel reported via Progress. This  means
that once user hit Esc all further requests for cancel state will return
truth, which was preventing OIDN denoiser from completing the denoising
task.

Now only allow stopping the denoiser when interactive rendering requests
a very fast stopping.

Aiming the fix for 3.0 branch.

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

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

M	intern/cycles/integrator/path_trace.cpp

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

diff --git a/intern/cycles/integrator/path_trace.cpp b/intern/cycles/integrator/path_trace.cpp
index 92bf8e69d19..f2fd5b1b028 100644
--- a/intern/cycles/integrator/path_trace.cpp
+++ b/intern/cycles/integrator/path_trace.cpp
@@ -479,7 +479,11 @@ void PathTrace::set_denoiser_params(const DenoiseParams &params)
   }
 
   denoiser_ = Denoiser::create(device_, params);
-  denoiser_->is_cancelled_cb = [this]() { return is_cancel_requested(); };
+
+  /* Only take into account the "immediate" cancel to have interactive rendering responding to
+   * navigation as quickly as possible, but allow to run denoiser after user hit Esc button while
+   * doing offline rendering. */
+  denoiser_->is_cancelled_cb = [this]() { return render_cancel_.is_requested; };
 }
 
 void PathTrace::set_adaptive_sampling(const AdaptiveSampling &adaptive_sampling)



More information about the Bf-blender-cvs mailing list