perf(sky): ~10x cheaper night-sky lattice — one-round cell hash, 2x2x2 block, bit-sliced stars
The owner measured 63% GPU at night vs 28% by day: the starfield lattice was the whole difference. Three lossless cuts: - one packed-multiply hash round per cell instead of ~9 chained PCG rounds (position/presence bit-sliced from one result, brightness/tint from a second); - the 3x3x3 neighbourhood sweep becomes the 2x2x2 block around the sample — a star's visible footprint (a few px) is far smaller than a lattice cell on screen, so any star outside that block is over a full cell (>=15 px) away and contributes nothing; - background mottle drops its invisible third octave. Same densities, sizes, colours, and look; star positions reshuffle (procedural layout, not authored). sky.frag.spv re-pinned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
9fcc3f4870
commit
9cf15e1f13
4 changed files with 43 additions and 31 deletions
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue