perf: gsplat local rasterize early-out via precomputed power cutoff#8623
Merged
Conversation
- Bump projCache stride from 7 to 8 u32 per splat (32-byte cache-line)
- Tile-count pass writes -0.5 * radiusFactor into slot 7
- Rasterize (color + pick) early-outs per 2x2 quad when all 4 pixels are
below the per-splat cutoff, skipping exp() and the blend chain
- Centralize CACHE_STRIDE into gsplat-local-constants.js and inject it
into the compute shaders via cdefines ({CACHE_STRIDE})
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.
Speed up
GSplatLocalRasterizeby expandingprojCacheto a 32-byte (8 x u32) stride and precomputing a per-splat Gaussian power cutoff so the rasterize kernel can skipexp()and the blend chain for non-contributing pixels.Changes:
projCachestride from 7 to 8 u32 per splat (32 bytes, cache-line friendly; partial writes become full cache-line writes)-0.5 * radiusFactorinto slot 7 — a tighter per-splat cutoff than the global -4 for low-opacity splatspower4 <= cutoffat all 4 pixels, skippingexp(),half4blend math, and (in pick mode) 4evalSplatPickcallsCACHE_STRIDEinto a single JS constant (scene/gsplat-unified/gsplat-local-constants.js) and inject it into the three compute shaders viacdefines({CACHE_STRIDE}) — removes the four duplicated declarationsPerformance (17M splats):
No public API changes.