Skip to content

Make frustum culling always-on and remove dead pcNodeIndex pipeline#8562

Merged
mvaligursky merged 2 commits intomainfrom
mv-always-on-culling
Mar 31, 2026
Merged

Make frustum culling always-on and remove dead pcNodeIndex pipeline#8562
mvaligursky merged 2 commits intomainfrom
mv-always-on-culling

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Mar 31, 2026

Make frustum culling always-on, removing the manual culling toggle from GSplatParams. 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:

  • Remove culling property from GSplatParams — frustum culling is now always active when interval compaction runs (local tiled renderer or GPU sorting)
  • Remove the dead pcNodeIndex per-splat stream pipeline, which was a leftover from the old per-splat compaction path:
    • GSPLAT_NODE_INDEX / HAS_NODE_MAPPING shader blocks from WGSL and GLSL copy-to-workbuffer shaders
    • uBoundsBaseIndex uniform bind from the work buffer render pass
    • nodeMappingTexture generation and registration from GSplatOctree
    • pcNodeIndex stream handling from GSplatWorkBuffer and GSplatParams
  • Simplify GSplatIntervalCompaction to always compile with culling enabled, removing the cullingEnabled parameter and dual shader variants
  • Simplify compute-gsplat-interval-cull.js by removing all #ifdef CULLING_ENABLED guards
  • Simplify gpuSorting from getter/setter to a plain property (no longer needs side effects)

API Changes:

  • Removed: scene.gsplat.culling (boolean) — culling is now always on when interval compaction is used; the property no longer exists

Examples:

  • Removed Culling toggle from lod-streaming example controls
  • Removed scene.gsplat.culling = true from lod-streaming and world examples

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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.culling toggle and associated pcNodeIndex pipeline/shader blocks (WGSL/GLSL).
  • Simplify interval compaction to a single always-culling compute variant (no CULLING_ENABLED variant 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.

Comment thread src/scene/gsplat-unified/gsplat-manager.js Outdated
@mvaligursky mvaligursky merged commit 3ae33b7 into main Mar 31, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-always-on-culling branch March 31, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: graphics Graphics related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants