only lightmap updated tiles once they're visible

This commit is contained in:
Ricardo Luís Vaz Silva 2024-12-21 19:01:53 -03:00 committed by Magnus Norddahl
commit aa51ac7b6d
6 changed files with 26 additions and 7 deletions

View file

@ -78,7 +78,11 @@ static void MarkTilesForUpdate(FLevelLocals * Level, const TArrayView<int> &tile
{
if(i >= 0)
{
Level->levelMesh->Lightmap.Tiles[i].NeedsUpdate = true;
auto &tile = Level->levelMesh->Lightmap.Tiles[i];
if(tile.AlwaysUpdate == 0 && !tile.NeedsUpdate)
{
tile.AlwaysUpdate = 3;
}
}
}
}