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

rift_mote_cluster

Draws a cluster of glowing motes per element. The mesh carries degenerate quads (all four corners at one point, told apart by their UV) on a unit sphere; the vertex stage orbits each around its own axis and expands it to a camera-facing sprite. The element's scale sets how far th…

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

rift_mote_cluster

Draws a cluster of glowing motes per element. The mesh carries degenerate quads (all four corners at one point, told apart by their UV) on a unit sphere; the vertex stage orbits each around its own axis and expands it to a camera-facing sprite. The element's scale sets how far the cluster spreads, so a simulated swarm of a thousand leaders draws as thousands of motes for the cost of a thousand renderables. Lane 0 is the HDR colour and opacity; size is the sprite size in metres.

In vertex_clip each sub-mote takes a stable id from where it sits in the cluster mesh and hashes it into three values. It circles a per-mote axis at 0.35 to 1.25 radians per second, at a radius that breathes between 0.2 and 1.0 of its rest position, is placed through the element's origin, axes and scale, and is expanded into a sprite size times 0.55 to 1.45 across. The three hashes pass to the fragment as the vertex colour. The fragment draws a core and halo that twinkle at a per-mote rate of 1.5 to 7.5 radians per second, leans each sub-mote's hue between a cool (0.75, 0.85, 1.25) and a warm (1.25, 0.8, 1.0) tint of the cluster's colour, and whitens the core. It returns the colour times its coverage times gain, with the coverage as alpha.

The arcane_rift graph (rift/arcane_rift.procGraph) draws its motes output with it through moteMat (additive, culling off, depth writes off, size 0.055, gain wired to the graph's intensity input). The 900 leaders come from the rift_motes solver; each draws a cluster mesh of eight zero-size quads placed on a sphere shell, at a random spread of 0.6 to 1.0, coloured from a blue-violet-pink ramp by a random hue. In the Procgen Effects Showcase world, the fx_rift scene plays the graph.

The shader includes rift_noise with #include "rift_noise".

Properties

PropertyTypeDefaultMeaning
gainfloat1.0Multiplies the output colour (range 0 to 50).
sizefloat0.06Sprite size of each sub-mote in metres, before its 0.55 to 1.45 variation (range 0 to 1).
vertexBoundsDilationfloat2.1How far the vertex hook moves a vertex past the mesh, in world units: the culling bounds grow by it so a moved vertex stays inside them.

Lanes

LaneCarries
data0.rgbHDR colour of the cluster.
data0.aOpacity.

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
descriptionDraws a cluster of orbiting, twinkling glowing motes per element by expanding degenerate quads into sprites.

Sub-parts

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

Showing up to 3 levels deep. Open a part to see what it holds further down.

11+items
·
shadermodule · born here
❒asset
# rift_noise Precision-safe integer-hash value noise and fbm (2D, 3D, and y-periodic variants for seamless time scrolling) shared by the arcane rift shaders. The hashes are integer PCG hashes of the lattice cell, so they stay crisp however large the coordinates grow, and every 2D noise can wrap along y with a period in lattice cells, so a field scrolled by time loops seamlessly. The interpolation is the smoothstep curve `f * f * (3 - 2 * f)`. A shader includes it with: ```wgsl #include "rift_noise" ``` The asset folder holds the same source as `module.wgsl` and `init.wgsl`. ## Functions | Function | Arguments | Returns | |---|---|---| | `rn_pcg(v)` | `v: u32` | A PCG-hashed `u32`. | | `rn_hash2(c)` | `c: vec2i`, a lattice cell | A hash of the cell as an `f32` between 0 and 1. | | `rn_hash3(c)` | `c: vec3i`, a lattice cell | A hash of the cell as an `f32` between 0 and 1. | | `rn_noise2p(p, period)` | `p: vec2f`, `period: i32` | 2D value noise between 0 and 1. With `period` above 0, the lattice wraps along y every `period` cells. | | `rn_noise2(p)` | `p: vec2f` | `rn_noise2p(p, 0)`: 2D value noise with `period` 0. | | `rn_fbm2(p)` | `p: vec2f` | Five octaves of `rn_noise2` with amplitudes 0.5, 0.25, 0.125 and so on; each octave rotates and scales the point by the matrix (1.6, 1.2, -1.2, 1.6) and offsets it. | | `rn_fbm2p(p, period)` | `p: vec2f`, `period: i32` | Four octaves of `rn_noise2p`, the frequency and the period doubling each octave so every octave wraps along y with the base period. | | `rn_noise3(p)` | `p: vec3f` | 3D value noise between 0 and 1. | | `rn_wrap(t, period)` | `t: f32`, `period: f32` | `t` wrapped into [0, period), to keep a time-scrolled coordinate small. | ## Used by - `rift_core`: `rn_fbm2` and `rn_noise2` for the tear's jagged edge, the abyss swirl, the rim flicker and the halo tongues. - `rift_crack`: `rn_wrap` for the surge trains and `rn_noise2` for the flicker. - `rift_mote_cluster`: `rn_hash3` for each sub-mote's id and `rn_wrap` for its orbit and twinkle. - `rift_plume`: `rn_wrap` and `rn_fbm2p` with a period of 16 for the climbing wisps.
▲ 0↑ born
❒
package · born here
❒asset
# effectShowcase The procedural effects of the Procgen Effects Showcase world. Each one is a `.procGraph` that plays through a `Generator`, and every shader, material and module a graph draws with sits beside it in this package, so the package carries everything its graphs need. Each graph's README says what it makes, how to place it and what each of its inputs changes. ## Contents | Folder | Graphs | What they make | |---|---|---| | `combat/` | `impact`, `muzzleFlash`, `tracer` | A round striking a hard surface, the bloom at a barrel as a weapon fires, and the glowing streak of a round in flight. They draw with `fxFlash`, `fxSmoke` and `fxSpark` in `combat/shaders/`. | | `blast/` | `wall_blast` | A charge blowing a breach through a stone block wall, on a 9.6 s loop. | | `storm/` | `storm`, `tower` | A thunderstorm around a lone tower: wind-driven rain, lightning striking on the schedule `schedule.module` keeps, and sparks and smoke where strikes land. `tower` is the stone keep it stands around. | | `rift/` | `arcane_rift` | A rift tearing open in the ground, its motes and rubble moved by the compute shaders in `rift/compute/`. | | `dragon/` | `dragon_breath` | A dragon's fire breath sweeping a courtyard: a flame jet, rolling smoke and drifting embers. | | `launch/` | `launch` | A heavy-lift rocket liftoff on one looping timeline, with the heat-haze material `rk_haze_mat`. | | `waterfall/` | `wf_env`, `wf_water`, `wf_spray`, `wf_foam`, `wf_mist` | A waterfall built in parts: the cliff, basin and boulders, the falling and still water, the droplets, the foam where the falls land, and the mist with its rainbow. Its water materials are in `waterfall/materials/`. | | `shaders/` | | `fx_noise`, the noise functions the waterfall and wall blast shaders include. | ## Playing one A graph plays on a `Generator` component bound to it: ```lua -- `graph` is the graph's reference: the AssetRef `asset.resolve` or a search returns for it. local e = entity.spawn("impact", { position = { 0, 1, 0 } }) e.component.add("Generator", { graph = graph, playOn = "load" }) ``` Set a graph's inputs with the Generator's `params`, e.g. `params = { size = 3 }`.
▲ 0↑ born
backing path · effectShowcase.package/rift/shaders/rift_mote_cluster.shader

Problems

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

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬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.