From 9b9d1560fa6b8b493ed1a94ab6f1017d1bb70623 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 22 Apr 2026 15:21:48 +0200 Subject: [PATCH] auto-git: [change] src/viewport-three/viewport-host.ts --- src/viewport-three/viewport-host.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index 3baef965..60dcc6e2 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -1523,12 +1523,20 @@ export class ViewportHost { } const world = this.currentSimulationScene?.world ?? this.currentWorld; + const resolvedTime = + this.currentSimulationScene !== null && this.currentSimulationClock !== null + ? resolveRuntimeTimeState( + this.currentSimulationScene.time, + this.currentSimulationClock + ) + : null; const resolvedWorld = this.currentSimulationScene !== null && this.currentSimulationClock !== null ? resolveRuntimeDayNightWorldState( world, this.currentSimulationScene.time, - this.currentSimulationClock + this.currentSimulationClock, + resolvedTime ) : null; const rendererSettings = @@ -1622,12 +1630,22 @@ export class ViewportHost { displayedSunLight, displayedMoonLight ); + const shaderSkyState = + resolvedWorld === null + ? null + : resolveWorldShaderSkyRenderState( + world, + resolvedWorld, + resolvedTime, + this.currentSimulationScene?.time ?? null + ); this.worldBackgroundRenderer.update( displayedBackground, backgroundTexture, backgroundOverlayState, - celestialBodiesState + celestialBodiesState, + shaderSkyState ); this.scene.background = null; this.scene.environment = environmentState.texture;