diff --git a/project/code/TMV/Mission.cs b/project/code/TMV/Mission.cs index 0da3a7a..c621baa 100644 --- a/project/code/TMV/Mission.cs +++ b/project/code/TMV/Mission.cs @@ -277,7 +277,12 @@ public partial class Mission : Node3D private static Texture BuildLightmapTexture(WorldRep.Cell[] cells, PackingRectangle[] packingRects, Dictionary rectDataMap, Dictionary surfaceDataMap) { - RectanglePacker.Pack(packingRects, out var bounds); + var bounds = Timing.TimeStage("RectPack", () => + { + RectanglePacker.Pack(packingRects, out var bounds); + return bounds; + }); + GD.Print($"Creating lightmap with bounds: ({bounds.Width}, {bounds.Height})"); var image = Image.CreateEmpty((int)bounds.Width, (int)bounds.Height, false, Image.Format.Rgba8); foreach (var rect in packingRects) {