EEVEE: Fix crash when using motion blur without postfx blur

This commit is contained in:
Clément Foucault 2020-06-24 14:27:35 +02:00
parent dd328be0f0
commit a6c59863d3
1 changed files with 6 additions and 2 deletions

View File

@ -470,8 +470,6 @@ static void eevee_render_to_image(void *vedata,
/* 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);
DRW_cache_restart();
}
else {
EEVEE_motion_blur_step_set(ved, MB_PREV);
@ -536,6 +534,12 @@ static void eevee_render_to_image(void *vedata,
EEVEE_temporal_sampling_create_view(vedata);
EEVEE_render_draw(vedata, engine, render_layer, rect);
if (i < time_steps_tot - 1) {
/* Don't reset after the last loop. Since EEVEE_render_read_result
* might need some DRWPasses. */
DRW_cache_restart();
}
}
}