Apply celestial light horizon fading logic to day/night state

This commit is contained in:
2026-04-28 14:27:34 +02:00
parent 13ab51e145
commit 6759d09eca

View File

@@ -993,7 +993,12 @@ export function resolveRuntimeDayNightWorldState(
timeOfDay.dusk.lightIntensityFactor, timeOfDay.dusk.lightIntensityFactor,
0, 0,
phaseWeights phaseWeights
) * smoothstep(-0.16, 0.18, sunDirection.y); ) *
smoothstep(
CELESTIAL_LIGHT_HORIZON_FADE_START,
CELESTIAL_LIGHT_HORIZON_FADE_END,
sunDirection.y
);
const ambientFactor = blendScalarByWeights( const ambientFactor = blendScalarByWeights(
1, 1,
timeOfDay.dawn.ambientIntensityFactor, timeOfDay.dawn.ambientIntensityFactor,