Only force baking of tiles where the geometry changed

This commit is contained in:
Magnus Norddahl 2025-05-13 01:51:41 +02:00
commit 76fb5901d7
8 changed files with 106 additions and 45 deletions

View file

@ -3173,7 +3173,9 @@ bool MapLoader::LoadLightmap(MapData* map)
tile->Transform.TranslateWorldToLocal = entry.translateWorldToLocal;
tile->Transform.ProjLocalToU = entry.projLocalToU;
tile->Transform.ProjLocalToV = entry.projLocalToV;
tile->NeedsUpdate = false;
tile->NeedsInitialBake = false;
tile->GeometryUpdate = false;
tile->ReceivedNewLight = false;
foundBindings.Push({ &entry, tile });
}
@ -3210,7 +3212,9 @@ bool MapLoader::LoadLightmap(MapData* map)
memcpy(dstline, srcline, width * 3 * sizeof(uint16_t));
}
tile->NeedsUpdate = false;
tile->NeedsInitialBake = false;
tile->GeometryUpdate = false;
tile->ReceivedNewLight = false;
}
if (errors > 0)