Skip to content

fix: pass alphaClip to scatter pass instead of hardcoding 1/255#8564

Merged
mvaligursky merged 1 commit intomainfrom
mv-fix-scatter-alphaclip
Mar 31, 2026
Merged

fix: pass alphaClip to scatter pass instead of hardcoding 1/255#8564
mvaligursky merged 1 commit intomainfrom
mv-fix-scatter-alphaclip

Conversation

@mvaligursky
Copy link
Copy Markdown
Contributor

@mvaligursky mvaligursky commented Mar 31, 2026

Fixes a mismatch between the tile count and scatter passes where the scatter shader hardcoded alphaClip to 1.0/255.0 while the tile count pass used the actual uniform value.

Changes:

  • Add alphaClip uniform to the scatter shader, replacing the hardcoded 1.0 / 255.0 in computeSplatTileEval
  • Pass the same alphaClip value from JS to both tile count and scatter passes

In pick mode (alphaClip = 0.3), tile count computed a tighter radius (fewer tiles) while scatter used 1/255 producing a wider radius (more tiles). This caused scatter to try assigning splats to tiles with insufficient allocated capacity, silently dropping assignments near tile boundaries via the bounds check.

The scatter pass hardcoded alphaClip to 1/255 for radius computation
while the tile count pass used the actual uniform value. In pick mode
(alphaClip=0.3), this caused scatter to use a wider radius than tile
count, potentially overflowing tile allocations and silently dropping
splat assignments near tile boundaries.

Made-with: Cursor
@mvaligursky mvaligursky self-assigned this Mar 31, 2026
@mvaligursky mvaligursky added the area: graphics Graphics related issue label Mar 31, 2026
@mvaligursky mvaligursky merged commit 3256744 into main Mar 31, 2026
8 checks passed
@mvaligursky mvaligursky deleted the mv-fix-scatter-alphaclip branch March 31, 2026 13:01
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