Make frustum culling always-on and remove dead pcNodeIndex pipeline#8562
Merged
mvaligursky merged 2 commits intomainfrom Mar 31, 2026
Merged
Make frustum culling always-on and remove dead pcNodeIndex pipeline#8562mvaligursky merged 2 commits intomainfrom
mvaligursky merged 2 commits intomainfrom
Conversation
Frustum culling is now always active when interval compaction runs (local tiled renderer or GPU sorting), removing the need for a manual toggle. Also removes the dead pcNodeIndex per-splat stream pipeline that was left over from the old per-splat compaction path. Made-with: Cursor
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes GSplat frustum culling effectively always-on for the interval-compaction pipeline and removes the legacy per-splat pcNodeIndex/node-mapping path, simplifying shaders, work-buffer setup, and the public GSplat params API.
Changes:
- Remove
scene.gsplat.cullingtoggle and associatedpcNodeIndexpipeline/shader blocks (WGSL/GLSL). - Simplify interval compaction to a single always-culling compute variant (no
CULLING_ENABLEDvariant selection). - Update examples and controls to remove the culling UI/usage.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scene/shader-lib/wgsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js | Removes node-index output uniforms/texture usage from WGSL work-buffer copy shader. |
| src/scene/shader-lib/wgsl/chunks/gsplat/compute-gsplat-interval-cull.js | Makes interval cull compute always include bounds/transforms + frustum test (no #ifdef). |
| src/scene/shader-lib/glsl/chunks/gsplat/frag/gsplatCopyToWorkbuffer.js | Removes node-index output uniforms/texture usage from GLSL work-buffer copy shader. |
| src/scene/gsplat/gsplat-resource-base.js | Removes HAS_NODE_MAPPING define generation. |
| src/scene/gsplat-unified/gsplat-work-buffer.js | Stops enabling GSPLAT_NODE_INDEX define based on pcNodeIndex stream presence. |
| src/scene/gsplat-unified/gsplat-work-buffer-render-pass.js | Removes uBoundsBaseIndex binding. |
| src/scene/gsplat-unified/gsplat-params.js | Removes culling API and node-index stream syncing; simplifies gpuSorting to a plain property. |
| src/scene/gsplat-unified/gsplat-octree.js | Removes nodeMappingTexture generation/registration and related imports. |
| src/scene/gsplat-unified/gsplat-manager.js | Updates culling/compaction flow and removes culling toggle usage. |
| src/scene/gsplat-unified/gsplat-interval-compaction.js | Removes dual cull-pass variants; always binds bounds/transforms buffers. |
| examples/src/examples/gaussian-splatting/world.example.mjs | Removes gsplat.culling usage. |
| examples/src/examples/gaussian-splatting/lod-streaming.example.mjs | Removes culling observer wiring. |
| examples/src/examples/gaussian-splatting/lod-streaming.controls.mjs | Removes culling UI toggle. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Make frustum culling always-on, removing the manual
cullingtoggle fromGSplatParams. Since culling was merged into the interval compaction compute pass, its GPU cost is negligible (a few dot products per interval), while the benefit of reducing splat count for sorting and rendering is significant. Culling runs automatically when the local tiled renderer or GPU sorting is used (both WebGPU-only paths that use interval compaction). It is not used with CPU sorting on any platform.Changes:
cullingproperty fromGSplatParams— frustum culling is now always active when interval compaction runs (local tiled renderer or GPU sorting)pcNodeIndexper-splat stream pipeline, which was a leftover from the old per-splat compaction path:GSPLAT_NODE_INDEX/HAS_NODE_MAPPINGshader blocks from WGSL and GLSL copy-to-workbuffer shadersuBoundsBaseIndexuniform bind from the work buffer render passnodeMappingTexturegeneration and registration fromGSplatOctreepcNodeIndexstream handling fromGSplatWorkBufferandGSplatParamsGSplatIntervalCompactionto always compile with culling enabled, removing thecullingEnabledparameter and dual shader variantscompute-gsplat-interval-cull.jsby removing all#ifdef CULLING_ENABLEDguardsgpuSortingfrom getter/setter to a plain property (no longer needs side effects)API Changes:
scene.gsplat.culling(boolean) — culling is now always on when interval compaction is used; the property no longer existsExamples:
scene.gsplat.culling = truefrom lod-streaming and world examples