Repository navigation
Distance-prioritized Gaussian chunk budget solve (#1423) - #1439
Merged
Merged
Conversation
) Protects near-camera chunks from being thinned by far-chunk demand in the pager's density-cap solve: splits chunks into a near/far priority band and solves the far band's room only after the near band's own demand is granted in full, instead of one uniform cap applied to every visible chunk regardless of distance. This covers the CPU-side paging decision path (GaussianPagingPolicy.fillDensityCapByBand). The GPU-side resident- chunk quota solve (GaussianWorkingSetBudget.metal) is a separate, larger change tracked as a follow-up.
…h priority bands (#1423) Extends the budget-overshoot fix to the real resident-chunk quota solve (previously only the CPU paging-priority path was fixed). The chunk cull now computes each chunk's camera distance in the entity's local space (fixing a world/local-space mismatch that silently broke the split for any rotated or translated entity) and assigns a continuous near/far priority weight via smoothstep over `priorityTransitionWidth`, instead of a hard cutoff at `nearPriorityDistance`. The budget solve grants the near band up to `nearPriorityShare` of the room (default 0.85) rather than the whole room first-come-first-served, so the far band is always guaranteed a floor instead of being starved to zero — the hard-cutoff version was confirmed (via a Sandbox repro forcing visionOS's real 1M-splat working-set cap against gardenscene's 3.3M-splat lod0) to zero out the far band whenever near demand alone saturated the budget, causing chunks to disappear outright rather than thin gracefully. Per-chunk quotas blend the two bands' grants (`gaussianMixedQuota`) rather than blending the density caps themselves: blending caps is NaN-prone whenever one is infinite, and any finite fallback for that case creates a hard step in the resulting quota exactly where the fallback switches sides — which reproduced as chunks visibly flickering on and off as the camera moved. Blending two already-finite quotas has no such discontinuity. All three knobs (`nearPriorityDistance`, `nearPriorityShare`, `priorityTransitionWidth`) default to values that reproduce the original single-cap behavior when `distancePrioritizedBudget` is off, and `GaussianChunkCullConstants`/`GaussianBudgetScaleConstants`/ `GaussianVisibleChunk` grew to carry the new per-entity and per-chunk fields.
…level diagnostics (#1423) Adds a docs/API/UsingGaussianSystem.md section covering GaussianPagingPolicy.distancePrioritizedBudget, nearPriorityDistance, priorityTransitionWidth and nearPriorityShare, and why per-chunk quotas blend the two bands' grants rather than their density caps. gaussianBudgetSnapshot() gains coarseChunks/coarseSplats so a caller can tell whether a scene's per-chunk coarse levels are actually engaging, independent of visual inspection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1423 — large
.untoldgsscenes (e.g. a 3.3M-splat garden capture against visionOS's 1,000,000-splat working-set budget) rendered uniformly sparse, because the chunk-level budget solve computed one global density cap per frame and applied it to every visible chunk regardless of distance.GaussianPagingPolicy.fillDensityCapByBand/GaussianChunkCullMath.densityCap(near:far:grant:)— near/far priority bands for the pager's streaming decisions.GaussianWorkingSetBudget.metalnow solves two bands' density caps instead of one, with the near band's camera distance computed in the entity's own local space (fixing a world/local-space mismatch that silently broke the split for any rotated or translated entity).smoothstepoverpriorityTransitionWidth, not a hard cutoff atnearPriorityDistance— avoids a visible pop at the boundary.nearPriorityShare × room(default 0.85), not the whole room — so the far band is guaranteed a floor instead of being starved to exactly zero, which a hard-cutoff/unconditional-protection version was confirmed to do.+inf × 0), and any finite fallback for that case creates a hard step that showed up as chunks flickering on/off as the camera moved.All new knobs (
distancePrioritizedBudget,nearPriorityDistance,nearPriorityShare,priorityTransitionWidth) default to values that exactly reproduce the original single-cap behavior when the feature is off.Test plan
swift test --filter UntoldEngineTests— CPU unit testsswift test --filter UntoldEngineRenderTests(Gaussian test classes) — GPU render tests, run repeatedly through developmentworkingSetSplatsOverrideto visionOS's real 1,000,000-splat cap against a 3.3M-splat scene, confirmed the fix resolves the uniform-sparse rendering and the flicker at the band boundaryDocs:
docs/API/UsingGaussianSystem.mdupdated with the new knobs and thegaussianBudgetSnapshot()diagnostic API.