auto-git:

[change] src/document/migrate-scene-document.ts
 [change] src/document/scene-document-validation.ts
 [change] src/document/scene-document.ts
 [change] src/rendering/world-background-renderer.ts
This commit is contained in:
2026-04-22 15:59:11 +02:00
parent ad3cb85f3d
commit 0c592addbe
4 changed files with 8 additions and 3 deletions

View File

@@ -191,6 +191,7 @@ import {
SCENE_TRANSITION_ENTITIES_SCENE_DOCUMENT_VERSION,
SCENE_TRANSITION_SEQUENCE_EFFECTS_SCENE_DOCUMENT_VERSION,
SCHEDULER_CONTROL_EFFECTS_SCENE_DOCUMENT_VERSION,
SHADER_SKY_SCENE_DOCUMENT_VERSION,
SPATIAL_AUDIO_SCENE_DOCUMENT_VERSION,
STARTER_PBR_MATERIAL_LIBRARY_SCENE_DOCUMENT_VERSION,
PROJECT_NAME_SCENE_DOCUMENT_VERSION,
@@ -5153,6 +5154,8 @@ export function migrateSceneDocument(source: unknown): SceneDocument {
source.version !== DAWN_DUSK_BACKGROUND_IMAGE_SCENE_DOCUMENT_VERSION &&
source.version !== WHITEBOX_BOX_LIGHT_VOLUME_SCENE_DOCUMENT_VERSION &&
source.version !== CELESTIAL_BODY_OVERLAY_SCENE_DOCUMENT_VERSION &&
source.version !== SHADER_SKY_SCENE_DOCUMENT_VERSION &&
source.version !== SCENE_DOCUMENT_VERSION &&
source.version !== FOLLOW_ACTOR_PATH_SMOOTH_SCENE_DOCUMENT_VERSION
) {
throw new Error(

View File

@@ -352,12 +352,12 @@ function validateWorldShaderSkySettings(
);
}
if (!isFiniteNumberInRange(settings.horizonHeight, -1, 1)) {
if (!isFiniteNumberInRange(settings.horizonHeight, -0.5, 0.5)) {
diagnostics.push(
createDiagnostic(
"error",
"invalid-world-shader-sky-horizon-height",
"World shader sky horizon height must stay between -1 and 1.",
"World shader sky horizon height must stay between -0.5 and 0.5.",
`${path}.horizonHeight`
)
);

View File

@@ -29,7 +29,8 @@ import {
} from "../sequencer/project-sequences";
import type { Terrain } from "./terrains";
export const SCENE_DOCUMENT_VERSION = 71 as const;
export const SCENE_DOCUMENT_VERSION = 72 as const;
export const SHADER_SKY_HORIZON_HEIGHT_SCENE_DOCUMENT_VERSION = 72 as const;
export const SHADER_SKY_SCENE_DOCUMENT_VERSION = 71 as const;
export const CELESTIAL_BODY_OVERLAY_SCENE_DOCUMENT_VERSION = 70 as const;
export const WHITEBOX_BOX_LIGHT_VOLUME_SCENE_DOCUMENT_VERSION = 69 as const;

View File

@@ -875,6 +875,7 @@ export class WorldBackgroundRenderer {
private syncShaderSkyState(state: WorldShaderSkyRenderState | null) {
if (state === null) {
this.shaderSkyMaterial.uniforms.uHorizonHeight.value = 0;
this.shaderSkyMaterial.uniforms.uStarVisibility.value = 0;
this.shaderSkyMaterial.uniforms.uSunVisible.value = 0;
this.shaderSkyMaterial.uniforms.uMoonVisible.value = 0;