From e93efb91f29bfb728850eaba6598f0c2e8cb9880 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Mon, 27 Jan 2025 18:09:46 +0000 Subject: [PATCH] Early out of valid portal checks if destination is already marked as mightsee --- KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs b/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs index 943d838..52afb94 100644 --- a/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs +++ b/KeepersCompound.Lightmapper/PotentiallyVisibleSet.cs @@ -166,6 +166,11 @@ public class PotentiallyVisibleSet { var target = _edges[targetEdgeIdx]; var targetPlane = target.Poly.Plane; + + if (source.MightSee[target.Destination]) + { + continue; // target is already explored + } var validTarget = false; foreach (var v in target.Poly.Vertices)