Cold Start
- ..
- .metadata17 B
- README.md3.6 KB
- bindings.yaml223 B
- reference_carve.png160 KB
- shader.wgsl20.4 KB
README.md
snow_trail
The ski trail, as its own geometry: a ribbon dense along the track and shaped across it, lifted into place by one compute dispatch a frame.
What it has to look like
Read off the reference (a snowboarder carving deep snow, low sun across the slope). Each line is a claim the geometry has to answer, and the whole point of writing them down is that "closer than it was" is not one of them.
- The displaced snow is a ROLLED ROPE, not a bank. The outside of the turn carries a thick, round, continuous roll of snow — a tube lying on the surface, its top clearly above the untouched snow around it. It is the largest thing in the frame after the rider: of the order of a metre thick, comparable to the rider's own body. A smooth swell a few centimetres proud is not this.
- One broad trough, not two grooves. In snow this deep the track is a single smooth trough the width of the board, its floor in blue shadow, its far wall rising into the roll. Two thin parallel grooves belong to a groomed piste, not to this.
- The roll is asymmetric. Nearly all of the displaced snow is on the OUTSIDE of the turn. The inside has a small lip at most.
- The trough floor is smooth and the roll is granular. The compressed floor reads as polished; the roll reads as broken clods, because it is snow that has been thrown rather than pressed.
- The roll overhangs its own base. Its outer face is steeper than the snow would stand at, because it was pushed there — it is not a pile that settled.
- The trail persists and reads at distance. Earlier parts of the track are visible across the slope as a thinner line, so the shape has to survive being small on screen as well as filling it.
- Depth follows the turn. Where the turn is hardest the trough is deepest and the roll is biggest; where the track runs straight both fall away to almost nothing.
The reference frame itself lives in the conversation that set this work off; what is durable is the list above, which is what a capture gets held against.
How it is driven
The CPU appends one track sample per frame into a RING buffer, so the trail runs for ever rather than filling up: the ribbon's first segment is always the newest sample and the rest trail backwards through the buffer. Old samples settle as they age, because snow relaxes.
Dispatch it over the ribbon's vertices, ceil(count / 64) groups.
Buffers
| binding | name | role |
|---|---|---|
| 0 | vertices | the ribbon's vertex buffer, written in place |
| 1 | track | the ring of track samples, 8 floats each |
| 2 | ctrl | the parameters below |
A track sample
| slot | meaning |
|---|---|
| 0, 1 | centre x, z |
| 2, 3 | unit vector across the track |
| 4 | ground height at the centre |
| 5 | edge load, 0..1 |
| 6 | cross slope, metres of rise per metre across |
| 7 | which way the turn is loaded, -1 or +1 |
ctrl
| slot | meaning |
|---|---|
| 0 | vertex count |
| 1 | vertices across the ribbon |
| 2 | samples written in total (the ring's head) |
| 3 | segments the ribbon has |
| 4 | trough half width at full load |
| 5 | roll width |
| 6 | roll height at full load |
| 7 | trough depth at no load |
| 8 | trough depth added at full load |
| 9 | how far the roll overhangs its base, 0..1 |
| 10 | how much of the roll is clods, in metres |
| 11 | inside lip as a fraction of the roll |
| 12 | samples over which an old track settles |
| 13 | how much of its depth a settled track keeps |