fix(renderer): cull splats by projected footprint - #397
Conversation
b578399 to
4f5ba10
Compare
|
Hi @yingliang-zhang , thank you for your contribution. I agree that the way we are culling splats using just the splat center and However, I feel that neither our current solution nor yours really solves the problem on a more fundamental level... The original 3DGS formulation is an approximation with a very strange Z-plane aligned projection that causes problems with clipping and distortion. I think there are several more principled approaches:
In This is a feature we intend to add to Spark in the near future to improve, stay tuned! cc: @oscarlorentzon @dmarcos |
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.