Cold Start
- ..
- .metadata17 B
- README.md2.1 KB
- properties.yaml1.8 KB
- shader.wgsl7.3 KB
README.md
asc_spark
ASCENSION's ember swarm — the sparks the fire tornado throws off its own surface.
The vertex stage flies each spark off material scalars and there is no per-frame
CPU at all. Each spark rides the column's live radius profile at its current
height and its azimuth advances with the accumulated spin in revolutions, so the
swarm turns with the surface it came off instead of drifting through it, and the
radius contracts with height as the inflow. Sparks exist only below the fire
front — ignite is coverage measured from the root — and during the tear they
lose the axis on the wind exactly as the flame ropes do.
A spark is a soft round dot of a fixed pixel size
The mesh is four coincident vertices per spark, spanned into a camera-facing
quad by the vertex stage on cam_right / cam_up, which the aspect writes
every frame; uv.x is the seed and uv.y packs the corner index in its integer
part and the size multiplier in its fraction, because a mesh vertex carries two
uv channels and a billboarded sprite needs three numbers. The fragment fades on
1 − dot(uv, uv), so there is no quad edge, no corner and no straight line in
the sprite.
Its world size is proportional to its distance from the camera, so its screen
size is constant: size_k is the target diameter as a fraction of frame height
times the lens half-angle, recomputed from the live fov each frame. Authored as a
world size, a spark that reads as three pixels at the 330 u approach arrives at
the 84 u climax as a sixteen-pixel slab of geometry.
It blends additively, premultiplied by its own falloff, so a spark can only ever add light. An ember darker than the fire behind it is a hole, not an ember.
The authored centres fill the whole flight volume, so the static AABB covers every animated position.
It is a separate shader from fyr_ember rather than a reuse of it because that
one bakes a 7 u flight height and a sub-metre spiral in as constants, and scaling
the entity to reach 240 u would scale the ember's own size by the same factor.