gas producer on gas planet are pretty slow to render #232
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Done in
4ebd832.GasVentFieldcalledqueue_redraw()every frame, and its_drawrebuilt six vents of seven glowing polygons each — 168 antialiased polylines re-tessellated per frame, since every NeonDraw call expands into four.Measured first: 40 rasterisations over 30 frames, costing 6.6ms against a 32.4ms floor. For scale, the black hole's cached disc costs 0.1ms.
Both halves are pieces now. The sources never move, recolour or fade, so they are rasterised once. The rising bubbles genuinely change size and opacity, but size is
scaleand opacity ismodulate— neither needs the geometry rebuilding. 40 rasterisations became 0.Two things worth recording for whoever optimises here next.
The static extraction alone measured nothing — 7.1ms against 6.6ms, inside the noise. softpipe is a CPU rasteriser: it prices fill, and cached geometry fills the same pixels, so it cannot see a tessellation saving at all. After the full change the frame time read negative with the floor drifting 28 to 39ms between runs. No millisecond figure is claimed here — the rasterisation count is the reproducible result, and what it is worth on a phone is unmeasured.
Scaling a
NeonPiecescales its stroke with it. The bubbles were first built as unit circles scaled up by their radius, which multiplied NeonDraw's widths by five to fourteen — a hundred pixels of glow around a fourteen pixel bubble. They rendered as bright blobs, the rasterisation count said 40 → 0, and only the screenshot disagreed. They are built at the largest radius and scaled down now, so the stroke only ever thins. Noted at the call site:scaleis safe for moving and shrinking a piece, and quietly wrong for growing one.