Log inGet started
World

Cold Start

Branchmain
Commitcfc095f0fc

README.md

p_tesla — DISCHARGE

Part 11 of the Raising Preseed demo (t = 270–295): a tesla coil discharging inside an industrial high-voltage test hall. preseed.teslahall builds the environment — steel trusses, gantry crane, transformer bank, capacitor rack, Marx column, catwalk, cable runs, high-bay lamps, warning beacons, hazard markings — with procedural tes_floor / tes_wall shaders whose analytic lights pulse with every discharge, hemisphere ambient with corner and contact occlusion, and moonlight pooling in from the high windows. The toroid and mast electrodes wear the tes_metal shader: procedural hall reflections (floor bounce, window band, roughness-widened lamp glints) scaled by the analytic EnvBRDF so bare metal reads as metal at night.

Sixteen arcs share one GPU mesh whose vertices the ptes_arcs compute pass rewrites every frame: two standing power arcs into the grounded strike masts, four strikers that leader-grow to the hall's grounded equipment (gantry hook, junction box, Marx electrode, railing, capacitor bus) and hold as re-striking power arcs, two dim violet air streamers, two ground crawlers, four toroid brush-corona fans and two upward connecting leaders rising from the target a striker approaches — plus twenty re-rolling branches. Channel paths are piecewise-linear value noise FROZEN per strike: a dart clock (50–100 ms) re-rolls fine detail and the branch set while the coarse trunk persists and drifts buoyantly upward (banjo), and the whole channel snaps — nothing eases. The tes_plasma shader (additive) layers a white-hot core, present only on attached power arcs, inside a violet nitrogen-emission sheath that carries all the hue; growing leaders reveal their frozen path behind a bright ionization head.

The CPU side (init.luau) runs the per-arc phase machines (off → grow → attach → hold), surges random arcs on the score's stab cues, throws a white-hot spark burst plus slow molten embers at every contact, sprays a fine violet corona off the toroid rim, chases the lingering impact light, browns out the high-bay lamps after big strikes, pulses the red beacons and feeds flash/impact state into the hall and metal shaders. Static topology comes from the one-shot ptes_init pass; per-frame renderer.mesh.update copies the fresh vertices into the drawn slab region (the p_sph scatter pattern).