Fix T71154: EEVEE Soft Shadows Viewport Rendering
EEVEE Soft shadows were not rendered correctly during viewport rendering. The reason for this is that during viewport rendering the shadow buffers were only update once and not per sample. This resulted that all the samples calculated the same shadow. This fix moves the call to `EEVEE_shadows_update` from cache finished to draw scene. This needs to happen before `EEVEE_lightprobes_refresh`. Reviewed By: fclem Differential Revision: https://developer.blender.org/D6538
This commit is contained in:
parent
c22d2f9e01
commit
7c9d15fca8
Notes:
blender-bot
2023-02-14 03:46:57 +01:00
Referenced by issue #71154, New soft shadows don't support viewport render [no TAA]
|
@ -229,8 +229,10 @@ static void eevee_draw_background(void *vedata)
|
|||
/* Copy previous persmat to UBO data */
|
||||
copy_m4_m4(sldata->common_data.prev_persmat, stl->effects->prev_persmat);
|
||||
|
||||
/* Refresh Probes */
|
||||
/* Refresh Probes
|
||||
* Shadows needs to be updated for correct probes */
|
||||
DRW_stats_group_start("Probes Refresh");
|
||||
EEVEE_shadows_update(sldata, vedata);
|
||||
EEVEE_lightprobes_refresh(sldata, vedata);
|
||||
EEVEE_lightprobes_refresh_planar(sldata, vedata);
|
||||
DRW_stats_group_end();
|
||||
|
|
|
@ -208,13 +208,11 @@ void EEVEE_lights_cache_add(EEVEE_ViewLayerData *sldata, Object *ob)
|
|||
linfo->num_light++;
|
||||
}
|
||||
|
||||
void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
||||
void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *UNUSED(vedata))
|
||||
{
|
||||
EEVEE_LightsInfo *linfo = sldata->lights;
|
||||
|
||||
sldata->common_data.la_num_light = linfo->num_light;
|
||||
|
||||
DRW_uniformbuffer_update(sldata->light_ubo, &linfo->light_data);
|
||||
|
||||
EEVEE_shadows_update(sldata, vedata);
|
||||
}
|
||||
|
|
|
@ -447,12 +447,13 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
|
|||
EEVEE_volumes_set_jitter(sldata, stl->effects->taa_current_sample - 1);
|
||||
EEVEE_materials_init(sldata, stl, fbl);
|
||||
|
||||
/* Refresh Probes */
|
||||
/* Refresh Probes
|
||||
* Shadows needs to be updated for correct probes */
|
||||
EEVEE_shadows_update(sldata, vedata);
|
||||
EEVEE_lightprobes_refresh(sldata, vedata);
|
||||
EEVEE_lightprobes_refresh_planar(sldata, vedata);
|
||||
|
||||
/* Refresh Shadows */
|
||||
EEVEE_shadows_update(sldata, vedata);
|
||||
EEVEE_shadows_draw(sldata, vedata, stl->effects->taa_view);
|
||||
|
||||
/* Set matrices. */
|
||||
|
|
Loading…
Reference in New Issue