Skip to content

Apply gsplat scene settings in applySceneSettings#8909

Merged
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-apply-settings
Jun 15, 2026
Merged

Apply gsplat scene settings in applySceneSettings#8909
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-apply-settings

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Applies serialized scene render settings (e.g. from the Editor) to the gsplat parameters, so gsplat configuration round-trips through AppBase#applySceneSettings like fog, sky, and clustered lighting already do.

Changes:

  • Add GSplatParams#applySettings(render) (internal) that reads flat gsplat-prefixed keys off the render settings object, assigning through the existing setters with fallbacks (missing keys leave the current value unchanged).
  • Invoke it from Scene#applySettings, alongside the existing sky / lighting delegations.
  • Document the supported settings.render.gsplat* keys in the AppBase#applySceneSettings JSDoc.

Settings applied:
gsplatRadialSorting, gsplatLodUpdateDistance, gsplatLodUpdateAngle, gsplatLodBehindPenalty, gsplatLodUnderfillLimit, gsplatSplatBudget, gsplatAlphaClip, gsplatAlphaClipForward, gsplatMinPixelSize, gsplatMinContribution, gsplatFoveationStrength, gsplatFoveationCenter, gsplatAntiAlias, gsplatUseFog, gsplatColorUpdateAngle, gsplatCooldownTicks, gsplatDataFormat, gsplatEnableIds.

No public API additions; this is additive and backward compatible.

Add GSplatParams#applySettings(render) and invoke it from Scene#applySettings
so serialized scene render settings (e.g. from the Editor) configure the
gsplat parameters. Reads flat gsplat-prefixed keys for a selected set of
serializable parameters.
@github-actions

Copy link
Copy Markdown

Public API report

This PR changes the public API surface (+2 / −2), per the docs' rules (@ignore / @Private / undocumented are excluded).

Show API diff
-AppBase.applySceneSettings(settings: { physics: { gravity: number[] }; render: { ambientBake: boolean; ambientBakeNumSamples: number; ambientBakeOcclusionBrightness: number; ambientBakeOcclusionContrast: number; ambientBakeSpherePart: number; ambientLuminance: number; clusteredLightingEnabled: boolean; exposure: number; fog: string; fog_color: number[]; fog_density: number; fog_end: number; fog_start: number; gamma_correction: number; global_ambient: number[]; lightingAreaLightsEnabled: boolean; lightingCells: number[]; lightingCookieAtlasResolution: number; lightingCookiesEnabled: boolean; lightingMaxLightsPerCell: number; lightingShadowAtlasResolution: number; lightingShadowsEnabled: boolean; lightingShadowType: number; lightmapFilterEnabled: boolean; lightmapFilterRange: number; lightmapFilterSmoothness: number; lightmapMaxResolution: number; lightmapMode: number; lightmapSizeMultiplier: number; skybox: number | null; skyboxIntensity: number; skyboxLuminance: number; skyboxMip: number; skyboxRotation: number[]; skyCenter: number[]; skyMeshPosition: number[]; skyMeshRotation: number[]; skyMeshScale: number[]; skyType: string; tonemapping: number } }): void
+AppBase.applySceneSettings(settings: { physics: { gravity: number[] }; render: { ambientBake: boolean; ambientBakeNumSamples: number; ambientBakeOcclusionBrightness: number; ambientBakeOcclusionContrast: number; ambientBakeSpherePart: number; ambientLuminance: number; clusteredLightingEnabled: boolean; exposure: number; fog: string; fog_color: number[]; fog_density: number; fog_end: number; fog_start: number; gamma_correction: number; global_ambient: number[]; gsplatAlphaClip: number; gsplatAlphaClipForward: number; gsplatAntiAlias: boolean; gsplatColorUpdateAngle: number; gsplatCooldownTicks: number; gsplatDataFormat: string; gsplatEnableIds: boolean; gsplatFoveationCenter: number; gsplatFoveationStrength: number; gsplatLodBehindPenalty: number; gsplatLodUnderfillLimit: number; gsplatLodUpdateAngle: number; gsplatLodUpdateDistance: number; gsplatMinContribution: number; gsplatMinPixelSize: number; gsplatRadialSorting: boolean; gsplatSplatBudget: number; gsplatUseFog: boolean; lightingAreaLightsEnabled: boolean; lightingCells: number[]; lightingCookieAtlasResolution: number; lightingCookiesEnabled: boolean; lightingMaxLightsPerCell: number; lightingShadowAtlasResolution: number; lightingShadowsEnabled: boolean; lightingShadowType: number; lightmapFilterEnabled: boolean; lightmapFilterRange: number; lightmapFilterSmoothness: number; lightmapMaxResolution: number; lightmapMode: number; lightmapSizeMultiplier: number; skybox: number | null; skyboxIntensity: number; skyboxLuminance: number; skyboxMip: number; skyboxRotation: number[]; skyCenter: number[]; skyMeshPosition: number[]; skyMeshRotation: number[]; skyMeshScale: number[]; skyType: string; tonemapping: number } }): void
-Application.applySceneSettings(settings: { physics: { gravity: number[] }; render: { ambientBake: boolean; ambientBakeNumSamples: number; ambientBakeOcclusionBrightness: number; ambientBakeOcclusionContrast: number; ambientBakeSpherePart: number; ambientLuminance: number; clusteredLightingEnabled: boolean; exposure: number; fog: string; fog_color: number[]; fog_density: number; fog_end: number; fog_start: number; gamma_correction: number; global_ambient: number[]; lightingAreaLightsEnabled: boolean; lightingCells: number[]; lightingCookieAtlasResolution: number; lightingCookiesEnabled: boolean; lightingMaxLightsPerCell: number; lightingShadowAtlasResolution: number; lightingShadowsEnabled: boolean; lightingShadowType: number; lightmapFilterEnabled: boolean; lightmapFilterRange: number; lightmapFilterSmoothness: number; lightmapMaxResolution: number; lightmapMode: number; lightmapSizeMultiplier: number; skybox: number | null; skyboxIntensity: number; skyboxLuminance: number; skyboxMip: number; skyboxRotation: number[]; skyCenter: number[]; skyMeshPosition: number[]; skyMeshRotation: number[]; skyMeshScale: number[]; skyType: string; tonemapping: number } }): void
+Application.applySceneSettings(settings: { physics: { gravity: number[] }; render: { ambientBake: boolean; ambientBakeNumSamples: number; ambientBakeOcclusionBrightness: number; ambientBakeOcclusionContrast: number; ambientBakeSpherePart: number; ambientLuminance: number; clusteredLightingEnabled: boolean; exposure: number; fog: string; fog_color: number[]; fog_density: number; fog_end: number; fog_start: number; gamma_correction: number; global_ambient: number[]; gsplatAlphaClip: number; gsplatAlphaClipForward: number; gsplatAntiAlias: boolean; gsplatColorUpdateAngle: number; gsplatCooldownTicks: number; gsplatDataFormat: string; gsplatEnableIds: boolean; gsplatFoveationCenter: number; gsplatFoveationStrength: number; gsplatLodBehindPenalty: number; gsplatLodUnderfillLimit: number; gsplatLodUpdateAngle: number; gsplatLodUpdateDistance: number; gsplatMinContribution: number; gsplatMinPixelSize: number; gsplatRadialSorting: boolean; gsplatSplatBudget: number; gsplatUseFog: boolean; lightingAreaLightsEnabled: boolean; lightingCells: number[]; lightingCookieAtlasResolution: number; lightingCookiesEnabled: boolean; lightingMaxLightsPerCell: number; lightingShadowAtlasResolution: number; lightingShadowsEnabled: boolean; lightingShadowType: number; lightmapFilterEnabled: boolean; lightmapFilterRange: number; lightmapFilterSmoothness: number; lightmapMaxResolution: number; lightmapMode: number; lightmapSizeMultiplier: number; skybox: number | null; skyboxIntensity: number; skyboxLuminance: number; skyboxMip: number; skyboxRotation: number[]; skyCenter: number[]; skyMeshPosition: number[]; skyMeshRotation: number[]; skyMeshScale: number[]; skyType: string; tonemapping: number } }): void

Informational only — this never fails the build.

@mvaligursky mvaligursky requested a review from Copilot June 15, 2026 16:24
@mvaligursky mvaligursky merged commit 44512e5 into main Jun 15, 2026
10 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-apply-settings branch June 15, 2026 16:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes Gaussian splat (gsplat) rendering configuration round-trip through AppBase#applySceneSettings by applying serialized settings.render.gsplat* keys onto Scene#gsplat parameters, similar to how sky and lighting settings are already applied.

Changes:

  • Add GSplatParams#applySettings(render) to copy settings.render.gsplat* values into gsplat parameters while leaving unspecified values unchanged.
  • Call this.gsplat.applySettings(render) from Scene#applySettings.
  • Document supported settings.render.gsplat* keys in AppBase#applySceneSettings JSDoc.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/scene/scene.js Invokes gsplat settings application during scene settings load.
src/scene/gsplat-unified/gsplat-params.js Implements GSplatParams#applySettings(render) to apply serialized render settings.
src/framework/app-base.js Documents the supported settings.render.gsplat* keys for applySceneSettings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +923 to +928
applySettings(render) {
this.radialSorting = render.gsplatRadialSorting ?? this.radialSorting;

this.lodUpdateDistance = render.gsplatLodUpdateDistance ?? this.lodUpdateDistance;
this.lodUpdateAngle = render.gsplatLodUpdateAngle ?? this.lodUpdateAngle;
this.lodBehindPenalty = render.gsplatLodBehindPenalty ?? this.lodBehindPenalty;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants