Log inGet started
World

Cold Start

Branchmain
Commitcfc095f0fc

README.md

ptes_arcs

The tesla coil's plasma discharge, as geometry: one thread per polyline point, rebuilding every vertex of the arc ribbon mesh each frame.

Sixteen channels share the ribbon — two standing power arcs into the grounded strike masts, four strikers, two air streamers, two ground crawlers, four toroid brush-corona fans and two upward connecting leaders — plus twenty branches that re-roll off them. A channel's path is FROZEN for the life of one strike: piecewise-linear value noise keyed on the strike's trunk seed, so the path snaps on re-seed and holds still in between. Re-strikes ("darts") re-roll only the fine octaves and the branch set; the channel drifts buoyantly upward (banjo) between them. A growing leader reveals its frozen path tip-first with a bright ionization head.

preseed/parts/p_tesla.module drives it, at ceil(1184 / 128) workgroups — one thread per point over 10 long arcs × 64 points, 6 corona arcs × 24 points and 20 branches × 20 points. ptes_init writes the matching index topology once.

Buffers

bindingnamerole
0vertsthe ribbon's vertex buffer, 23 u32 words per vertex, two vertices per point
1parthe records below

par

vec4<f32> records. The first four are global, then arc a in 0..15 occupies five at 4 + a * 5.

recordmeaning
0time, camera x, y, z (part-local)
1global amplitude, global brightness, 0, 0
2, 3reserved
arc recordmeaning
0start x, y, z, end x
1end y, end z, surge, trunk seed
2width, brightness, seed, bulge
3wobble amplitude, pin mode (1 = free tip), activity, dart count
4banjo rise, reach, core mix, pulse

Vertex layout

Two billboard vertices per point, written at the engine's 92-byte Vertex stride. Position, normal and UV carry the ribbon; the colour channel carries the channel's shading terms — surge, bright, coreMix, activity — which ptes_plasma reads to light the arc.