Skip to content

fix: use logarithmic depth quantization in compute GSplat bitonic sort#8570

Merged
mvaligursky merged 1 commit intomainfrom
mv-log-depth-bitonic-sort
Apr 1, 2026
Merged

fix: use logarithmic depth quantization in compute GSplat bitonic sort#8570
mvaligursky merged 1 commit intomainfrom
mv-log-depth-bitonic-sort

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Apr 1, 2026

Fix sort-instability flickering in the compute GSplat renderer by switching the bitonic sort's depth quantization from linear to logarithmic.

Changes:

  • Replace linear depth quantization with logarithmic quantization in the per-tile bitonic sort, matching the approach used by the bucket sort for large tiles
  • This gives proportionally more depth resolution to nearby splats and reduces depth-level collisions in tiles where perspective causes many splats to occupy a narrow depth range
  • Eliminates visible frame-to-frame flickering in depth-complex areas (e.g., foliage) caused by non-deterministic atomicAdd ordering in the scatter pass producing unstable sort results for equal-depth splats

Performance:

  • Negligible cost: one additional log() per splat in the sort setup phase (GPU SFU instruction), while the dominant Phase 4 bitonic comparison network is unchanged

Replace linear depth quantization with logarithmic quantization in the
per-tile bitonic sort, matching the bucket sort's approach. This gives
more depth resolution to nearby splats and reduces depth-level collisions
in distant tiles, eliminating visible frame-to-frame flickering caused by
non-deterministic atomicAdd ordering producing unstable sort results for
equal-depth splats.

Made-with: Cursor
@mvaligursky mvaligursky self-assigned this Apr 1, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Apr 1, 2026
@mvaligursky mvaligursky merged commit c051f3b into main Apr 1, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-log-depth-bitonic-sort branch April 1, 2026 14:25
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.

1 participant