Plane shadow vertices must be created after the level mesh, otherwise they do not receive the lightmap UV coordinates

This commit is contained in:
Magnus Norddahl 2023-12-16 01:20:03 +01:00
commit 1f6356f414
4 changed files with 25 additions and 25 deletions

View file

@ -3709,13 +3709,6 @@ void MapLoader::LoadLevel(MapData *map, const char *lumpname, int position)
}
InitRenderInfo(); // create hardware independent renderer resources for the level. This must be done BEFORE the PolyObj Spawn!!!
Level->ClearDynamic3DFloorData(); // CreateVBO must be run on the plain 3D floor data.
CreateVBO(*screen->RenderState(), Level->sectors);
for (auto &sec : Level->sectors)
{
P_Recalculate3DFloors(&sec);
}
SWRenderer->SetColormap(Level); //The SW renderer needs to do some special setup for the level's default colormap.
InitPortalGroups(Level);
@ -3728,5 +3721,12 @@ void MapLoader::LoadLevel(MapData *map, const char *lumpname, int position)
InitLevelMesh(map);
Level->ClearDynamic3DFloorData(); // CreateVBO must be run on the plain 3D floor data.
CreateVBO(*screen->RenderState(), Level->sectors);
for (auto& sec : Level->sectors)
{
P_Recalculate3DFloors(&sec);
}
Level->aabbTree = new DoomLevelAABBTree(Level);
}