From 77f69be219407a68882f5daee3b20025e35a5d9e Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Tue, 28 Jan 2025 17:33:25 +0000 Subject: [PATCH] Only compute mightsee for edges of cells with lights in --- KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs b/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs index 99cc401..4d36203 100644 --- a/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs +++ b/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs @@ -151,7 +151,7 @@ public class PotentiallyVisibleSet _graph[i] = new Node(edgeIndices); } - Parallel.ForEach(_edges, ComputeEdgeMightSee); + // Parallel.ForEach(_edges, ComputeEdgeMightSee); } public int[] GetVisible(int cellIdx) @@ -253,6 +253,7 @@ public class PotentiallyVisibleSet foreach (var edgeIdx in _graph[cellIdx].EdgeIndices) { var edge = _edges[edgeIdx]; + ComputeEdgeMightSee(edge); for (var i = 0; i < edge.MightSee.Length; i++) { if (edge.MightSee[i])