diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-11-24 17:52:50 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-11-25 11:50:33 +0300 |
commit | 40d28b40dfd0b0093263947f66fc1760abd55ad6 (patch) | |
tree | 661e6f14a44e7479a6372f53fd0ae55c0ef8dfc0 /intern | |
parent | b41c72b710d4013fd6d67dc49a8ebb2a416b4462 (diff) |
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
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/integrator/path_trace.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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 ¶ms) } 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) |