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:
authorJeroen Bakker <jeroen@blender.org>2020-03-23 19:04:40 +0300
committerJeroen Bakker <jeroen@blender.org>2020-03-23 19:10:01 +0300
commit58ac113b76d950c72c7319094f7e6cc61c70dc59 (patch)
tree65cfef6592ed1ce46e9c58061417eae4605c7277 /source/blender/draw/engines
parent24b27ea231154ce0d0b67402aeee00f63ab41f63 (diff)
Fix T74782: WorkBench TAA Artifacts During Painting/Drawing
When the TAA is finished the screen can still be redrawn by other operations without the TAA needs to be reset. If that happened the TAA did add a blank sample to the result. This patch will add an early exit in the case TAA was finished. Note that there are still some cases still not working. The overlay engine can in certain circumstances draw directly into the default_fb what can lead to render artifacts.
Diffstat (limited to 'source/blender/draw/engines')
-rw-r--r--source/blender/draw/engines/workbench/workbench_effect_antialiasing.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
index 3050093062f..05ce4c8395b 100644
--- a/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
+++ b/source/blender/draw/engines/workbench/workbench_effect_antialiasing.c
@@ -422,6 +422,7 @@ void workbench_antialiasing_draw_pass(WORKBENCH_Data *vedata)
* If TAA accumulation is finished, we only blit the result.
*/
+ const bool taa_finished = (wpd->taa_sample >= wpd->taa_sample_len) && wpd->taa_sample_len > 1;
if (wpd->taa_sample == 0) {
/* In playback mode, we are sure the next redraw will not use the same viewmatrix.
* In this case no need to save the depth buffer. */
@@ -440,6 +441,9 @@ void workbench_antialiasing_draw_pass(WORKBENCH_Data *vedata)
if (workbench_in_front_history_needed(vedata)) {
GPU_framebuffer_blit(fbl->antialiasing_in_front_fb, 0, dfbl->in_front_fb, 0, GPU_DEPTH_BIT);
}
+ if (taa_finished) {
+ return;
+ }
}
if (!DRW_state_is_image_render() || wpd->taa_sample + 1 == wpd->taa_sample_len) {