makepad/libs/game/render
Admin b9bd9527de Fireworks: 320 stars per shell, tighter break
"They explode too big for the number of particles." Exactly right, and the
mistake was treating star count and break size as two knobs. They are one.

A sphere is filled by rays per steradian, so doubling the radius needs FOUR
times the stars to read equally dense. The previous commit sized the break
honestly — 30-52 m, a real 6in shell — while leaving it at 64 stars, and 64
rays spread over 40 metres is not a flower, it is a handful of unrelated
dots drifting apart.

So: 2560 beads per shell at 8 per trail = 320 stars, up from 64, and the
break pulled in to 17-28 m (a 3in shell) from 30-52. Density is the product
of both changes — five times the rays into a third of the volume.

Beads are also slightly larger (1.25 from 0.9), because a bead 60+ metres
away has to survive being a couple of pixels.

Cost is 92k triangles at the 18-shell peak, which is the honest price of
density and exactly the sort of thing the thermometer exists to cut on a
headset. Still one instance per shell on the CPU.

A test pins SPARKS_PER_SHELL / TRAIL_LEN to the star count the shader
hardcodes. Drift there does not fail loudly — the Fibonacci distribution
just covers the wrong fraction of the sphere and the break stops being
round, which looks like a tuning problem and is not one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-05 16:59:45 +02:00
..
examples Baked AO for static props, the big world wired, and steering fixed at its source 2026-08-03 18:34:14 +02:00
src Fireworks: 320 stars per shell, tighter break 2026-08-05 16:59:45 +02:00
tests The Knight was never in the world — plus variety, fog, shadows, ranking 2026-08-03 11:23:53 +02:00
Cargo.toml Baked AO for static props, the big world wired, and steering fixed at its source 2026-08-03 18:34:14 +02:00