Eevee: Volumetrics: Request aditional frames when no TAA is enabled.
This commit is contained in:
@@ -713,16 +713,21 @@ void EEVEE_effects_init(EEVEE_SceneLayerData *sldata, EEVEE_Data *vedata)
|
||||
double ht_point[3];
|
||||
double ht_offset[3] = {0.0, 0.0};
|
||||
unsigned int ht_primes[3] = {3, 7, 2};
|
||||
static unsigned int current_sample = 0;
|
||||
struct wmWindowManager *wm = CTX_wm_manager(draw_ctx->evil_C);
|
||||
unsigned int current_sample = 0;
|
||||
|
||||
if (((effects->enabled_effects & EFFECT_TAA) != 0) && (ED_screen_animation_no_scrub(wm) == NULL)) {
|
||||
/* If TAA is in use do not use the history buffer. */
|
||||
volumetrics->history_alpha = 0.0f;
|
||||
current_sample = effects->taa_current_sample - 1;
|
||||
effects->volume_current_sample = -1;
|
||||
}
|
||||
else {
|
||||
current_sample = (current_sample + 1) % (ht_primes[0] * ht_primes[1] * ht_primes[2]);
|
||||
const unsigned int max_sample = (ht_primes[0] * ht_primes[1] * ht_primes[2]);
|
||||
current_sample = effects->volume_current_sample = (effects->volume_current_sample + 1) % max_sample;
|
||||
if (current_sample != max_sample - 1) {
|
||||
DRW_viewport_request_redraw();
|
||||
}
|
||||
}
|
||||
BLI_halton_3D(ht_primes, ht_offset, current_sample, ht_point);
|
||||
|
||||
|
||||
@@ -398,6 +398,7 @@ typedef struct EEVEE_EffectsInfo {
|
||||
|
||||
/* Volumetrics */
|
||||
bool use_volumetrics;
|
||||
int volume_current_sample;
|
||||
|
||||
/* SSR */
|
||||
bool use_ssr;
|
||||
|
||||
Reference in New Issue
Block a user