Change how visible surfaces for a tile are collected by the light mapper

This commit is contained in:
Magnus Norddahl 2024-09-07 03:11:36 +02:00
commit d2958d8366
7 changed files with 66 additions and 84 deletions

View file

@ -194,7 +194,10 @@ void VkLightmapper::Render()
bool buffersFull = false;
// Paint all surfaces visible in the tile
for (int surfaceIndex : targetTile->Surfaces)
visibleSurfaces.Clear();
mesh->GetVisibleSurfaces(targetTile, visibleSurfaces);
for (int surfaceIndex : visibleSurfaces)
{
LevelMeshSurface* surface = &mesh->Mesh.Surfaces[surfaceIndex];
pc.SurfaceIndex = surfaceIndex;