rift_rubble.computeShader
Analytic, per-chunk periodic motion for rubble orbiting the arcane rift, run as a `sim.shader` solver. Every chunk's state is a function of the solver time alone, periodic per chunk, so the loop is seamless: a chunk grows in while still buried, shudders, rips free, spirals up int…
rift_rubble
Analytic, per-chunk periodic motion for rubble orbiting the arcane rift, run as a sim.shader
solver. Every chunk's state is a function of the solver time alone, periodic per chunk, so the loop
is seamless: a chunk grows in while still buried, shudders, rips free, spirals up into orbit,
climbs, then crumbles to nothing glowing hot, and is buried again for its next cycle at a new spot
around the rift. It runs one invocation per chunk in workgroups of 64.
Each chunk hashes its index into its own values: a period of 0.8 to 1.2 times period, a phase
offset, a starting angle, the radius where it tears loose (1.5 to 4.1), its orbit radius (2.1 to
4.0), the height it climbs to (1.4 to 4.6), a size, an orbit speed and a tumble axis. Through each
cycle its phase passes four stages: emerging (0 to 0.08), ripping free (0.08 to 0.26), climbing
(0.22 to 0.9) and crumbling (0.84 to 0.985). The orbit is stretched 1.2 times along X, larger chunks
orbit and spin more slowly, and the chunk bobs gently once free.
Bindings
| Binding | Access | What it holds |
|---|---|---|
P | read_write | Positions, three floats per chunk; written. |
orient | read_write | Orientation quaternion per chunk (vec4f); written as a rotation about the chunk's axis. |
scale | read_write | Scale, three floats per chunk; written. It grows in over the first 5 percent of the cycle and falls to zero as the chunk crumbles. |
data0 | read_write | Per-chunk lane (vec4f); written as (heat, seed, cycle phase, 0). |
Heat is 0.25 + 1.2 * rip * (1 - climb) * emerge + 2.5 * crumble: the seams flare as the chunk rips
free and burn brightest as it crumbles.
Parameters
| Parameter | Type | Default | Meaning |
|---|---|---|---|
count | int | 0 | Number of chunks. |
time | float | 0.0 | Solver time in seconds. |
period | float | 16.0 | Base length of one cycle in seconds. |
spin | float | 0.55 | Base tumble rate. |
Dispatch
The arcane_rift graph (rift/arcane_rift.procGraph) dispatches it from its orbiting node, a
sim.shader over 72 points on a disc, with orient (Vec4), scale (Vec3) and data0 (Vec4)
attributes and uniforms period 17 and spin 0.55. The graph draws each chunk as a
noise-displaced, subdivided octahedron with the rift_rock material, casting shadows; rift_rock
reads heat from data0.x and per-chunk variation from data0.y. In the Procgen Effects Showcase world, the fx_rift scene plays the
graph.
Scoped to this part · feeds back into the world's score.