diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-08-12 18:25:10 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-08-12 19:10:50 +0300 |
commit | 58a457da3d8994cce056ae0c45a8649046717c00 (patch) | |
tree | 17a56bf5da3b8ae485392325c401fc984493722b | |
parent | 6f502136c7fd5d2d115ac28095fb176b72bc1ad6 (diff) |
Fix T79680, T79680: confusing viewport denoise start sample behavior
-rw-r--r-- | intern/cycles/render/session.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index 08a8cb08254..70c4214c684 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -1156,8 +1156,15 @@ bool Session::render_need_denoise(bool &delayed) return false; } + /* Immediately denoise when we reach the start sample or last sample. */ + const int num_samples_finished = tile_manager.state.sample + 1; + if (num_samples_finished == params.denoising.start_sample || + num_samples_finished == params.samples) { + return true; + } + /* Do not denoise until the sample at which denoising should start is reached. */ - if (tile_manager.state.sample < min(params.denoising.start_sample, params.samples - 1)) { + if (num_samples_finished < params.denoising.start_sample) { return false; } |