Fix T75062: Frame Flashes During 3D Viewport Animation Playback

This issue became visible after fixing other TAA issues recently.
The sample count of the first frame wasn't reset resulting that the
incorrect resolve took place. This issue was already there beforehand,
it is just much clearer during the recent changes.

Now the `taa_sample will be reset when performing an animation playback
in the 3d viewport.
This commit is contained in:
Jeroen Bakker
2020-03-26 08:18:07 +01:00
parent bae9553848
commit b2f04fce2d

View File

@@ -168,9 +168,9 @@ void workbench_antialiasing_engine_init(WORKBENCH_Data *vedata)
wpd->view = NULL;
/* reset complete drawing when navigating. */
/* reset complete drawing when navigating or during viewport playback. */
if (wpd->taa_sample != 0) {
if (wpd->is_navigating) {
if (wpd->is_navigating || wpd->is_playback) {
wpd->taa_sample = 0;
}
}
@@ -424,7 +424,6 @@ void workbench_antialiasing_draw_pass(WORKBENCH_Data *vedata)
const bool last_sample = wpd->taa_sample + 1 == wpd->taa_sample_len;
const bool taa_finished = wpd->taa_sample >= wpd->taa_sample_len;
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. */