Repository navigation
Release 1.5.0: faster where it was slow, measured - #4
Merged
Merged
Conversation
A splat whose opacity times its covered pixels is under the threshold (default 0.5) is left out of the sort and the draw, in the keys pass, by the same EWA footprint the draw uses (now one shared function). A million splats seen whole at 720p on Iris Xe: 27.4 -> 16.8 ms, 0.06% of channels moved by > 8 levels; a close capture unchanged. 1 halved the far case but visibly thinned close detail. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g camera keeps them The box moved with every texel and its depth range with every millimetre the camera did, so every cascade was a new matrix, and a redraw, nearly every frame. Sponza 720p, Iris Xe, camera moving: 4.00 -> 0.38 cascades redrawn a frame, GPU 10.7 -> 6.2 ms. Texels 1.5% larger. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oads only those Transforms, world boxes, the scene extent and the draw-data upload each walked all 100,000 renderables to find the 2 that moved. The transform store lists dirty and moved nodes (children from the order rebuild), the scene maps moved slots to renderables, and the extent is grown unless a box left a face. CPU 2.3 -> 1.2 ms a frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Profiled 256 lights in Sponza: walking the lists, two dependent loads a light, cost more than shading them. Loading four indices, then four positions, before testing any: forward 17.3 -> 14.1 ms at 3 m radius, 10.0 -> 8.9 at 2 m, unchanged at 1 m and with few lights; same picture. Finer clusters (2x slices: -1 ms dense, 2x memory) and partial light loads (no change) measured and left out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Splat culling (renderer.splatCull), sun shadow cascades cached while the camera moves, dirty lists for a frame where a few things move, and crowded lights walked four at a time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Faster where it was slow, measured. A speed audit of the engine against other engines'
techniques, each change A/B'd on Sponza, a million splats or 100,000 objects before it was
kept: splats too small to see are left out, the sun's shadows stay cached while the camera
moves, a frame where a few things move touches only those, and crowded lights shade faster.
Drawing tiny particles as points was measured slower and dropped.
Added
renderer.splatCull(default
0.5): a splat whose opacity times the pixels it covers is under it is left out of thesort and the draw, which a sub-pixel splat costs a quad of all the same. A million splats seen
whole at 720p on Iris Xe: 27.4 -> 16.8 ms, 0.06% of channels moved by more than 8 levels; a
capture seen close: unchanged.
0draws every splat as before.Changed
to whole texels and its depth range not at all, so a moving camera made a new matrix -- and a
redraw -- for every cascade nearly every frame. Snapped to a 16-texel grid, depth included, with
a grid step of margin, a cascade holds still until the camera has moved that far, and the cache
keeps it. Sponza at 720p on Iris Xe, camera moving: cascades redrawn 4.00 -> 0.38 a frame, GPU
10.7 -> 6.2 ms. Texels are 1.5% larger. Anything moving inside a cascade still redraws it at once.
transforms, updating world boxes, the scene's extent and the draw-data upload each walked every
node or renderable to find the ones that moved. The transform store now lists what was marked
dirty and what moved, composing those and their subtrees, and the rest follow the list. The
extent is grown by the boxes that moved, recomputed whole only when one leaves a face of it.
100,000 objects with 2 moving: CPU 2.3 -> 1.2 ms a frame (transforms 0.41 -> 0.02, draw data
0.58 -> 0.06, bounds 0.77 -> 0.3). Past 4,096 movers, or an eighth of the nodes, it is the
whole pass as before.
cell's light list rather than shading: every light was two loads, the second waiting on the
first. Lights are now read four at a time, their indices and then their positions, before any
is tested. 256 lights in Sponza at 720p on Iris Xe, forward pass: 17.3 -> 14.1 ms at 3 m radius,
10.0 -> 8.9 ms at 2 m, unchanged at 1 m and with few lights. The picture is the same.
🤖 Generated with Claude Code