From ca43e6f8a56a94105b532fd548a37bcdc70ecae1 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Tue, 24 Sep 2024 17:07:35 +0100 Subject: [PATCH] Correctly handle light strength close to light source --- KeepersCompound.Lightmapper/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KeepersCompound.Lightmapper/Program.cs b/KeepersCompound.Lightmapper/Program.cs index 14978e8..1a33624 100644 --- a/KeepersCompound.Lightmapper/Program.cs +++ b/KeepersCompound.Lightmapper/Program.cs @@ -324,9 +324,9 @@ class Program { strength /= 2; } - strength = Math.Min(1.0f, strength); var c = light.color * strength; + c = Vector3.Min(Vector3.One * 255, c); lightmap.AddLight(0, x, y, (byte)c.X, (byte)c.Y, (byte)c.Z); } }