fix(renderer): cull splats by projected footprint#397
Open
yingliang-zhang wants to merge 1 commit into
Open
Conversation
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
clipXYrejection with conservative projected-footprint culling for standard 3D GaussiansclipXYsemantics and add a focused shader source-contract regressionMotivation
The vertex shader currently rejects a splat when its center is outside the lateral
clipXYboundary. A large or anisotropic Gaussian can still overlap the retained region even when its center is outside that boundary, so the center-only test can remove visible border contributions.This change waits until the projected covariance and final ellipse axes are available. It computes the ellipse's axis-aligned NDC extent and rejects only when the complete footprint misses the configured boundary. A one-projected-pixel padding with a small NDC floor keeps the comparison conservative at float32 boundaries.
Scope
This is the lateral X/Y part of the broader clipping discussion in #226. It intentionally leaves the existing behind-camera and near/far center tests unchanged; precise Gaussian truncation across near/far planes also interacts with sorting and requires a separate design.
For 2DGS, the existing direct-corner path has no equivalent projected-covariance bound. It now defers lateral clipping to normal GPU primitive clipping rather than retaining the old false-negative center test. The tradeoff is additional vertex work for off-screen 2DGS primitives.
Verification
npm run build:wasmnpm test— 2/2 passednpm run lint— 85 files checked, no findingsnpm run build— production and development bundles built successfullyRelated to #226; this PR does not close the near/far clipping request.