From ac4039595ceab46f54e425922baae676a67dbbe5 Mon Sep 17 00:00:00 2001 From: iisaev Date: Sat, 24 Oct 2026 12:56:10 +0200 Subject: [PATCH] Expose the time-of-day weights --- src/Lights/UiLightController.cs | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Lights/UiLightController.cs b/src/Lights/UiLightController.cs index 3c130b1..2813c51 100644 --- a/src/Lights/UiLightController.cs +++ b/src/Lights/UiLightController.cs @@ -459,13 +459,12 @@ namespace Cthangover.Mods.Time return SceneContextNode.FindNode("Lamp"); } - // - // 06:00-10:00 - Morning - // 10:00-18:00 - Day - // 18:00-22:00 - Evening - // 22:00-06:00 - Night - // - private static Vector4 CalculateTimeWeights(float hour) + /// + /// Blend weights of the four phases (morning, day, evening, night) for an hour 0–24, with + /// two-hour cross-fades between them — the time_weights uniform of the time shaders. + /// Public so other lit views (the RPG map) follow the same day as the backgrounds. + /// + public static Vector4 CalculateTimeWeights(float hour) { float night = 0.0f; float morning = 0.0f;