diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-13 03:35:16 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-13 03:35:16 +0300 |
commit | 8b399d31485a8c75a37705103a6fb58c659a9b08 (patch) | |
tree | 63b7204200ce8633959b11cc942b599407818b21 /source/blender/draw | |
parent | a3f4de64e5c556bb081b6981009a49c7982e7b6a (diff) |
Eevee: Fix temporal sampling not resetting.
World Probe update was not resetting the TAA.
This also reset the volume sampling in cases that needs it (world/grid probe diffuse coefs update).
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lightprobes.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_lightprobes.c b/source/blender/draw/engines/eevee/eevee_lightprobes.c index 4b9a7ce28c8..e751f2dd6b4 100644 --- a/source/blender/draw/engines/eevee/eevee_lightprobes.c +++ b/source/blender/draw/engines/eevee/eevee_lightprobes.c @@ -1446,6 +1446,7 @@ static void lightprobes_refresh_world(EEVEE_ViewLayerData *sldata, EEVEE_Data *v EEVEE_CommonUniformBuffer *common_data = &sldata->common_data; EEVEE_LightProbesInfo *pinfo = sldata->probes; EEVEE_PassList *psl = vedata->psl; + EEVEE_StorageList *stl = vedata->stl; DRWMatrixState saved_mats; /* We need to save the Matrices before overidding them */ @@ -1465,9 +1466,14 @@ static void lightprobes_refresh_world(EEVEE_ViewLayerData *sldata, EEVEE_Data *v DRW_framebuffer_texture_detach(sldata->irradiance_rt); DRW_framebuffer_texture_attach(sldata->probe_filter_fb, sldata->probe_pool, 0, 0); common_data->prb_num_render_grid = 1; + /* Reset volume history. */ + stl->effects->volume_current_sample = -1; + common_data->vol_history_alpha = 0.0f; } pinfo->update_world = 0; DRW_viewport_request_redraw(); + /* Do not let this frame accumulate. */ + stl->effects->taa_current_sample = 1; DRW_viewport_matrix_override_set_all(&saved_mats); } @@ -1585,7 +1591,6 @@ static void lightprobes_refresh_cube(EEVEE_ViewLayerData *sldata, EEVEE_Data *ve DRW_viewport_request_redraw(); /* Do not let this frame accumulate. */ stl->effects->taa_current_sample = 1; - /* Only do one probe per frame */ return; } @@ -1712,6 +1717,9 @@ static void lightprobes_refresh_all_no_world(EEVEE_ViewLayerData *sldata, EEVEE_ DRW_viewport_request_redraw(); /* Do not let this frame accumulate. */ stl->effects->taa_current_sample = 1; + /* Reset volume history. */ + stl->effects->volume_current_sample = -1; + common_data->vol_history_alpha = 0.0f; /* Restore matrices */ DRW_viewport_matrix_override_set_all(&saved_mats); return; |