Log inGet started
World

Cold Start

Branchmain
Commitcfc095f0fc

README.md

asc_grain

ASCENSION's airborne sand. Up to 45 000 grains, and the entire flight happens in the vertex stage off material scalars — the pattern fyr_ember established and asc_spark refined — so the swarm costs no per-frame CPU.

Three things are this object's own:

  1. A wrapped tile around the camera. Each grain's authored position is a point in a lattice; the vertex stage re-tiles it into the tile centred on the camera with rel -= 2R * round(rel / 2R). The grain does not move with the camera — round picks WHICH COPY of a world-fixed lattice you are looking at, and the lattice itself only travels on wind_accum. Near the tile boundary the grain fades, so the copy that swaps is never one you can see. Every flight parameter is hashed off the seed rather than read off the authored position, which frees those coordinates to span the AABB the flight needs.
  2. A streak whose length is the gust. The quad is spanned on the wind direction and on the axis perpendicular to both the wind and the view, so a grain is a capsule lying along windDir that foreshortens correctly. Its base size is a constant number of PIXELS: size_k is target-pixels-per-unit-of-range and the vertex stage multiplies by distance.
  3. An inflow. Inside tor_reach a grain is drawn toward the axis, turned by spin (the same aux.torSpinAccum in revolutions the fill and the sparks turn by, so the three objects turn together) and lifted.

count_frac is a threshold on a uniformly distributed seed, so the beat sheet's 2 k → 24 k → 45 k → 6 k curve is exact and costs one float a frame.

Blends additive, premultiplied by the grain's own radial falloff. The storm is TEXTURE in the beats the tornado is hero in, and a sprite that can only add light cannot punch a hole in the fire behind it.

Driven by preseed.asc.asc_dust.