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:
authorFalk David <falkdavid@gmx.de>2021-04-28 17:30:20 +0300
committerFalk David <falkdavid@gmx.de>2021-04-28 17:30:20 +0300
commit67a52c8a4065f32a57d946524a4fab1d2ba92512 (patch)
tree116e8e08cd9f6e94b4a1daeeafd552b0a51f7be5 /source/blender/draw
parent11dc674c78b49fc4e0b7c134c375b6c8b8eacbcc (diff)
parente0fa295bc6f2f99f5679a4d423818d83c67628a2 (diff)
Merge branch 'blender-v2.93-release'
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/eevee/eevee_engine.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_engine.c b/source/blender/draw/engines/eevee/eevee_engine.c
index ae726d7af9a..509c002e25a 100644
--- a/source/blender/draw/engines/eevee/eevee_engine.c
+++ b/source/blender/draw/engines/eevee/eevee_engine.c
@@ -494,12 +494,7 @@ static void eevee_render_to_image(void *vedata,
/* Previous motion step. */
if (do_motion_blur_fx) {
- if (i > 0) {
- /* The previous step of this iteration N is exactly the next step of iteration N - 1.
- * So we just swap the resources to avoid too much re-evaluation. */
- EEVEE_motion_blur_swap_data(vedata);
- }
- else {
+ if (i == 0) {
EEVEE_motion_blur_step_set(ved, MB_PREV);
DRW_render_set_time(engine, depsgraph, floorf(time_prev), fractf(time_prev));
EEVEE_render_modules_init(vedata, engine, depsgraph);
@@ -570,6 +565,14 @@ static void eevee_render_to_image(void *vedata,
DRW_cache_restart();
}
}
+
+ if (do_motion_blur_fx) {
+ /* The previous step of next iteration N is exactly the next step of this iteration N - 1.
+ * So we just swap the resources to avoid too much re-evaluation.
+ * Note that this also clears the VBO references from the GPUBatches of deformed
+ * geometries. */
+ EEVEE_motion_blur_swap_data(vedata);
+ }
}
EEVEE_volumes_free_smoke_textures();