Log inGet started
·
computeshader · drop-in viewer
asset⌬ computeshadercomputeShaderprimary: shader.wgsl·part ofpackage effectShowcase.package·originates fromworld 0fc7535e-6…

rift_motes.computeShader

One step of the arcane mote swarm, run as a `sim.shader` solver with a neighbour grid. Motes swirl around the rift through a rolling vortex ring stirred by turbulence, and keep apart through grid-based separation, so the swarm streams together with its motes kept apart. It runs o…

byzero-proxy @ DESKTOP-DB3UJOJ·posted 11d ago
What it does

rift_motes

One step of the arcane mote swarm, run as a sim.shader solver with a neighbour grid. Motes swirl around the rift through a rolling vortex ring stirred by turbulence, and keep apart through grid-based separation, so the swarm streams together with its motes kept apart. It runs one invocation per mote in workgroups of 64.

For each mote the shader builds a desired velocity from four parts:

  • a swirl around the vertical axis through the origin, swirl * (0.45 + 1.4 * exp(-0.35 * rho)), fastest near the axis;
  • a poloidal roll around the ring core at radius coreR and height coreH: up on the inside, out over the top, down at the outer edge, at a rate set by rollRate;
  • a smooth turbulence from summed sines of position and time;
  • a pull back toward the ring core for any mote farther than shell from it, and a lift for any mote below height 0.2.

It then visits every mote in the 27 grid cells around it and adds a push away from each neighbour closer than radius, weighted by (1 - distance / radius)^2. The velocity eases toward the desired one at a rate of 1 - exp(-1.6 * dt), takes the push times separate * dt, is capped at 4.5 units per second, and moves the mote by velocity * dt.

Bindings

BindingAccessWhat it holds
Pread_writePositions, three floats per mote; the shader writes the new position.
prev_PreadPositions at the start of the step, read for the mote itself and for its neighbours.
vread_writeVelocities, three floats per mote; read and written back.
gcfgreadGrid configuration, used by zero_grid_cell and zero_grid_range.
grangereadPer-cell ranges into gorder, used by zero_grid_range.
gorderreadMote indices sorted by grid cell; the separation loop reads neighbours from it.

The grid helpers come from #include "@builtin::systems.procgen.grid".

Parameters

ParameterTypeDefaultMeaning
countint0Number of motes.
dtfloat0.0166667Step length in seconds.
timefloat0.0Solver time in seconds; drives the turbulence.
radiusfloat0.35Separation radius.
separatefloat7.0Strength of the separation push.
coreRfloat2.8Radius of the vortex ring's core from the vertical axis.
coreHfloat1.9Height of the vortex ring's core.
shellfloat3.2Distance from the ring core beyond which motes are pulled back.
swirlfloat1.7Speed of the swirl around the vertical axis.
rollRatefloat0.45Rate of the poloidal roll.

Dispatch

The arcane_rift graph (rift/arcane_rift.procGraph) dispatches it from its swarm node, a sim.shader over 900 points seeded in a cylinder of radius 4.2 and height 3.4, with a v (Vec3) attribute, neighborRadius 0.75 and uniforms radius 0.75, separate 5, coreR 2.5, coreH 1.7, shell 1.9, swirl 1.5 and rollRate 0.5. Each of those 900 leaders is drawn as a cluster of eight motes by rift_mote_cluster. In the Procgen Effects Showcase world, the fx_rift scene plays the graph.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

This asset doesn't declare a schema or structured payload.
⌬ Metadata
descriptionCompute step for the arcane rift's mote swarm: a swirling vortex ring with turbulence and grid-based neighbour separation.

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

4items
This part has no composite children. See the Files segment for its leaf payloads.
backing path · effectShowcase.package/rift/compute/rift_motes.computeShader

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.