Make LevelMeshUpdater responsible for updating the tiles (playsim tells the mesh updater, the level mesh tells the tiles)

This commit is contained in:
Magnus Norddahl 2025-05-11 20:11:18 +02:00
commit 6cf3cdb871
11 changed files with 45 additions and 117 deletions

View file

@ -94,22 +94,23 @@ void VkLightmapper::Raytrace(const TArray<LightmapTile*>& tiles)
lightmapRaytraceLast.active = true;
lightmapRaytraceLast.ResetAndClock();
fb->GetCommands()->PushGroup(fb->GetCommands()->GetTransferCommands(), "lightmap.total");
UploadUniforms();
SelectTiles(tiles);
if (selectedTiles.Size() > 0)
while (true)
{
fb->GetCommands()->PushGroup(fb->GetCommands()->GetTransferCommands(), "lightmap.total");
SelectTiles(tiles);
if (selectedTiles.Size() == 0)
break;
UploadUniforms();
Render();
Resolve();
if (lm_blur)
Blur();
CopyResult();
fb->GetCommands()->PopGroup(fb->GetCommands()->GetTransferCommands());
}
fb->GetCommands()->PopGroup(fb->GetCommands()->GetTransferCommands());
lightmapRaytraceLast.Unclock();
}
}