From 917380ee5e2b94e42f9d1b271a88e279c7a7f0db Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 24 Jul 2022 23:53:47 -0400 Subject: [PATCH] Oops --- NewHorizons/Components/StarLightController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewHorizons/Components/StarLightController.cs b/NewHorizons/Components/StarLightController.cs index d1ebcc7a..526a60fc 100644 --- a/NewHorizons/Components/StarLightController.cs +++ b/NewHorizons/Components/StarLightController.cs @@ -77,7 +77,7 @@ namespace NewHorizons.Components var shader = atmo.Item2; var sqrDist = (planet.transform.position - _activeStar.transform.position).sqrMagnitude; - var intensity = Mathf.Max(_activeStar.Light.intensity / (sqrDist / hearthSunDistanceSqr), 1f); + var intensity = Mathf.Min(_activeStar.Light.intensity / (sqrDist / hearthSunDistanceSqr), 1f); shader.SetFloat(SunIntensity, intensity); }