Fix: EEVEE: Shadow: Huge performance drop caused by local lights

Punctual shadow maps were never tagged as updated, constantly
refreshing themselves.
This commit is contained in:
Clément Foucault
2024-05-23 17:17:19 +02:00
parent 8b65908574
commit f968c99850
2 changed files with 2 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ struct ShadowTileMap : public ShadowTileMapData {
clip_data_index = tiles_index_ / SHADOW_TILEDATA_PER_TILEMAP;
/* Avoid uninitialized data. */
this->grid_offset = int2(0);
this->grid_shift = int2(0);
this->set_dirty();
}

View File

@@ -37,6 +37,7 @@ void main()
if (gl_LocalInvocationIndex == 0u) {
/* Reset shift to not tag for update more than once per sync cycle. */
tilemaps_buf[tilemap_index].grid_shift = ivec2(0);
tilemaps_buf[tilemap_index].is_dirty = false;
directional_range_changed = 0;