From a0790f50bd2f47b2643e5252d368250f2bd0be31 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 11 Jan 2025 17:17:12 +0000 Subject: [PATCH] Fix performance regression. Discard Lights with 0 brightness --- KeepersCompound.Lightmapper/LightMapper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KeepersCompound.Lightmapper/LightMapper.cs b/KeepersCompound.Lightmapper/LightMapper.cs index a212a17..8457745 100644 --- a/KeepersCompound.Lightmapper/LightMapper.cs +++ b/KeepersCompound.Lightmapper/LightMapper.cs @@ -293,7 +293,7 @@ public class LightMapper } } - if (propAnimLight != null) + if (propAnimLight != null && !propAnimLight.Dynamic) { var lightIndex = lightTable.LightCount; propAnimLight.LightTableLightIndex = (ushort)lightIndex; @@ -327,7 +327,7 @@ public class LightMapper lightTable.AddLight(light.ToLightData(32.0f)); } - if (propLight != null) + if (propLight != null && propLight.Brightness != 0) { var light = new Light {