Skip to content

fix(renderer): cull splats by projected footprint#397

Open
yingliang-zhang wants to merge 1 commit into
sparkjsdev:mainfrom
yingliang-zhang:fix/upstream-footprint-frustum-culling-v1
Open

fix(renderer): cull splats by projected footprint#397
yingliang-zhang wants to merge 1 commit into
sparkjsdev:mainfrom
yingliang-zhang:fix/upstream-footprint-frustum-culling-v1

Conversation

@yingliang-zhang

Copy link
Copy Markdown

Summary

  • replace center-only lateral clipXY rejection with conservative projected-footprint culling for standard 3D Gaussians
  • derive the NDC footprint bound from the final ellipse axes after covariance projection, blur, standard-deviation scaling, focal adjustment, and pixel-radius clamping
  • keep the 2DGS direct-corner path conservative by relying on GPU primitive clipping instead of rejecting by center
  • document the updated clipXY semantics and add a focused shader source-contract regression

Motivation

The vertex shader currently rejects a splat when its center is outside the lateral clipXY boundary. 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:wasm
  • npm test — 2/2 passed
  • npm run lint — 85 files checked, no findings
  • npm run build — production and development bundles built successfully
  • real WebGL browser capture exercised the shader with no compilation or console errors

Related to #226; this PR does not close the near/far clipping request.

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