Fix performance regression. Discard Lights with 0 brightness

This commit is contained in:
Jarrod Doyle 2025-01-11 17:17:12 +00:00
parent 2ecf17400e
commit a0790f50bd
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 2 deletions

View File

@ -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
{