Skip to content

[BREAKING] Move gsplat lodRangeMin/lodRangeMax to GSplatComponent#8908

Merged
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-component-lod-range
Jun 15, 2026
Merged

[BREAKING] Move gsplat lodRangeMin/lodRangeMax to GSplatComponent#8908
mvaligursky merged 1 commit into
mainfrom
mv-gsplat-component-lod-range

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Moves lodRangeMin / lodRangeMax off the global Scene#gsplat (GSplatParams) onto the per-GSplatComponent, since the valid LOD range is asset-specific (depends on each asset's octree.lodLevels). The budget balancer already operated on per-instance ranges, so this just changes where the values originate.

Changes:

  • Add lodRangeMin (default 0) and lodRangeMax (default 99) to GSplatComponent; the values flow through GSplatPlacement to the octree instance and are clamped to the asset's valid LOD range at use.
  • Deprecate GSplatParams#lodRangeMin / GSplatParams#lodRangeMax as warn-once no-ops.
  • Update gsplat examples and the streamed-gsplat script to set the range per component.

API Changes (breaking):

  • app.scene.gsplat.lodRangeMin / lodRangeMax are now deprecated no-ops (warn once). Use the component instead:

Before:

app.scene.gsplat.lodRangeMin = 0;
app.scene.gsplat.lodRangeMax = 3;

After:

entity.gsplat.lodRangeMin = 0;
entity.gsplat.lodRangeMax = 3;
  • New public API: GSplatComponent#lodRangeMin (default 0) and GSplatComponent#lodRangeMax (default 99). Note the max default is now 99 (effectively "no cap", clamped to the asset's max LOD), versus the old global default of 10.

Examples:

  • Updated: downtown, billions, depth-of-field, relighting, lod-streaming, lod-streaming-sh, world, splat-portal, vr-lod.

Move the LOD range limits off the global Scene#gsplat (GSplatParams) onto
the per-GSplatComponent, since the valid LOD range is asset-specific. The
global GSplatParams#lodRangeMin/lodRangeMax become deprecated warn-once
no-ops. Updates examples and the streamed-gsplat script accordingly.
@github-actions

Copy link
Copy Markdown

Public API report

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

Show API diff
+GSplatComponent.get lodRangeMax(): number
+GSplatComponent.get lodRangeMin(): number
+GSplatComponent.set lodRangeMax(value: number)
+GSplatComponent.set lodRangeMin(value: number)
-GSplatParams.get lodRangeMax(): number
-GSplatParams.get lodRangeMin(): number
-GSplatParams.set lodRangeMax(value: number)
-GSplatParams.set lodRangeMin(value: number)

Informational only — this never fails the build.

@mvaligursky mvaligursky merged commit c67179f into main Jun 15, 2026
9 checks passed
@mvaligursky mvaligursky deleted the mv-gsplat-component-lod-range branch June 15, 2026 15:55
willeastcott added a commit that referenced this pull request Jun 26, 2026
…8968)

lodRangeMin and lodRangeMax were added to GSplatComponent in #8908 but
never added to the component system's _properties list. As a result they
were silently ignored when passed to addComponent() and dropped when a
gsplat component was cloned (reset to their defaults of 0 / 99). Add them
alongside the sibling lodBaseDistance/lodMultiplier properties.

Also adds a GSplatComponent test covering init-from-data and clone, and
simplifies the splat-portal and world examples to pass their static LOD
values directly to addComponent.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
willeastcott added a commit that referenced this pull request Jun 26, 2026
…8968)

lodRangeMin and lodRangeMax were added to GSplatComponent in #8908 but
never added to the component system's _properties list. As a result they
were silently ignored when passed to addComponent() and dropped when a
gsplat component was cloned (reset to their defaults of 0 / 99). Add them
alongside the sibling lodBaseDistance/lodMultiplier properties.

Also adds a GSplatComponent test covering init-from-data and clone, and
simplifies the splat-portal and world examples to pass their static LOD
values directly to addComponent.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant