diff options
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_effects.c | 4 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_lookdev.c | 36 | ||||
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_private.h | 1 |
3 files changed, 29 insertions, 12 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index 3b2a3cc7c01..ca583143572 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -87,6 +87,10 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, stl->effects->taa_render_sample = 1; } + /* WORKAROUND: EEVEE_lookdev_init can reset TAA and needs a stl->effect. + * So putting this before EEVEE_temporal_sampling_init for now. */ + EEVEE_lookdev_init(vedata); + effects = stl->effects; effects->enabled_effects = 0; diff --git a/source/blender/draw/engines/eevee/eevee_lookdev.c b/source/blender/draw/engines/eevee/eevee_lookdev.c index 5deaf4d4d68..710d2c70479 100644 --- a/source/blender/draw/engines/eevee/eevee_lookdev.c +++ b/source/blender/draw/engines/eevee/eevee_lookdev.c @@ -95,24 +95,13 @@ static void eevee_lookdev_hdri_preview_init(EEVEE_Data *vedata, EEVEE_ViewLayerD } } -void EEVEE_lookdev_cache_init(EEVEE_Data *vedata, - EEVEE_ViewLayerData *sldata, - DRWPass *pass, - EEVEE_LightProbesInfo *pinfo, - DRWShadingGroup **r_shgrp) +void EEVEE_lookdev_init(EEVEE_Data *vedata) { EEVEE_StorageList *stl = vedata->stl; - EEVEE_TextureList *txl = vedata->txl; EEVEE_EffectsInfo *effects = stl->effects; - EEVEE_PrivateData *g_data = stl->g_data; const DRWContextState *draw_ctx = DRW_context_state_get(); /* The view will be NULL when rendering previews. */ const View3D *v3d = draw_ctx->v3d; - const Scene *scene = draw_ctx->scene; - - const bool probe_render = pinfo != NULL; - - effects->lookdev_view = NULL; if (eevee_hdri_preview_overlay_enabled(v3d)) { /* Viewport / Spheres size. */ @@ -142,9 +131,32 @@ void EEVEE_lookdev_cache_init(EEVEE_Data *vedata, effects->sphere_size = sphere_size; effects->anchor[0] = rect->xmax; effects->anchor[1] = rect->ymin; + stl->g_data->valid_double_buffer = false; EEVEE_temporal_sampling_reset(vedata); } + } +} + +void EEVEE_lookdev_cache_init(EEVEE_Data *vedata, + EEVEE_ViewLayerData *sldata, + DRWPass *pass, + EEVEE_LightProbesInfo *pinfo, + DRWShadingGroup **r_shgrp) +{ + EEVEE_StorageList *stl = vedata->stl; + EEVEE_TextureList *txl = vedata->txl; + EEVEE_EffectsInfo *effects = stl->effects; + EEVEE_PrivateData *g_data = stl->g_data; + const DRWContextState *draw_ctx = DRW_context_state_get(); + /* The view will be NULL when rendering previews. */ + const View3D *v3d = draw_ctx->v3d; + const Scene *scene = draw_ctx->scene; + + const bool probe_render = pinfo != NULL; + + effects->lookdev_view = NULL; + if (eevee_hdri_preview_overlay_enabled(v3d)) { eevee_lookdev_hdri_preview_init(vedata, sldata); } diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h index 5330ea2f770..7d41028195d 100644 --- a/source/blender/draw/engines/eevee/eevee_private.h +++ b/source/blender/draw/engines/eevee/eevee_private.h @@ -1357,6 +1357,7 @@ void EEVEE_render_update_passes(struct RenderEngine *engine, struct ViewLayer *view_layer); /** eevee_lookdev.c */ +void EEVEE_lookdev_init(EEVEE_Data *vedata); void EEVEE_lookdev_cache_init(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata, DRWPass *pass, |