diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-05-01 20:39:04 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-05-01 20:39:18 +0300 |
commit | e1bd883df3c1d41630b96ee3f9b570480b30a1e8 (patch) | |
tree | 5e2acd29e05608d2c476a82f41cd1ee51df0e069 /source | |
parent | 20c1edf59285e807b56516c6b9a09da59e5ff140 (diff) |
Eevee: Don't enable temporal AA when using 1 sample only.
This was producing infinite rendering but wasn't noticeable.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_temporal_sampling.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_temporal_sampling.c b/source/blender/draw/engines/eevee/eevee_temporal_sampling.c index dea6c362afa..b7f9af92673 100644 --- a/source/blender/draw/engines/eevee/eevee_temporal_sampling.c +++ b/source/blender/draw/engines/eevee/eevee_temporal_sampling.c @@ -178,6 +178,7 @@ int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data // EEVEE_FramebufferList *fbl = vedata->fbl; // EEVEE_TextureList *txl = vedata->txl; EEVEE_EffectsInfo *effects = stl->effects; + int repro_flag = 0; if (!e_data.taa_resolve_sh) { eevee_create_shader_temporal_sampling(); @@ -194,14 +195,6 @@ int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data ViewLayer *view_layer = draw_ctx->view_layer; IDProperty *props = BKE_view_layer_engine_evaluated_get(view_layer, COLLECTION_MODE_NONE, RE_engine_id_BLENDER_EEVEE); - int repro_flag = 0; - if (!DRW_state_is_image_render() && - BKE_collection_engine_property_value_get_bool(props, "taa_reprojection")) - { - repro_flag = EFFECT_TAA_REPROJECT | EFFECT_VELOCITY_BUFFER | EFFECT_DEPTH_DOUBLE_BUFFER | EFFECT_DOUBLE_BUFFER | EFFECT_POST_BUFFER; - effects->taa_reproject_sample = ((effects->taa_reproject_sample + 1) % 16); - } - if ((BKE_collection_engine_property_value_get_int(props, "taa_samples") != 1 && /* FIXME the motion blur camera evaluation is tagging view_updated * thus making the TAA always reset and never stopping rendering. */ @@ -210,6 +203,13 @@ int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data { float persmat[4][4], viewmat[4][4]; + if (!DRW_state_is_image_render() && + BKE_collection_engine_property_value_get_bool(props, "taa_reprojection")) + { + repro_flag = EFFECT_TAA_REPROJECT | EFFECT_VELOCITY_BUFFER | EFFECT_DEPTH_DOUBLE_BUFFER | EFFECT_DOUBLE_BUFFER | EFFECT_POST_BUFFER; + effects->taa_reproject_sample = ((effects->taa_reproject_sample + 1) % 16); + } + /* Until we support reprojection, we need to make sure * that the history buffer contains correct information. */ bool view_is_valid = stl->g_data->valid_double_buffer; |