Correctly handle light strength close to light source

This commit is contained in:
Jarrod Doyle 2024-09-24 17:07:35 +01:00
parent 860080ada3
commit ca43e6f8a5
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 1 additions and 1 deletions

View File

@ -324,9 +324,9 @@ class Program
{ {
strength /= 2; strength /= 2;
} }
strength = Math.Min(1.0f, strength);
var c = light.color * 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); lightmap.AddLight(0, x, y, (byte)c.X, (byte)c.Y, (byte)c.Z);
} }
} }