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

wf_sheet

Waterfall curtain: a ballistic vertex path off the lip, packet-timed ribbon noise that tears with distance fallen, aeration to white, backlit scatter and a refracted background.

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

wf_sheet

Waterfall curtain: a ballistic vertex path off the lip, packet-timed ribbon noise that tears with distance fallen, aeration to white, backlit scatter and a refracted background.

The vertex stage reads each vertex's place on the sheet back from the grid's own position: u across a 6.8-wide grid and s from 0 at the lip (base_y) to 1 at the bottom of height. It then places the vertex on the path water takes off a lip: it leaves with out_speed and falls under gravity (9.81), so after falling a distance s * height it has moved out_speed * t outward along -Z from z0. The sheet widens by spread toward the bottom, sways a little more the farther it has fallen, and is pushed along -Z by z_bias.

The fragment pins its pattern to packets of water: a packet released at time t0 has fallen 0.5 * g * (t - t0)^2, so the noise is sampled at the time each point's water left the lip. As the water speeds up its streaks stretch, and the sheet tears into ribbons because the breakup threshold rises with the distance fallen. Broad tongues, fine strands and grain come from fx_noise seeded by seed. Aeration turns the water from a deep green-blue to white where the flow is thin and fast, crests catch the sun through a Henyey-Greenstein phase (g 0.55), and the cliff behind shows through, bent by the ripples (zero_scene_color_refract). The tail fades into the plunge over the last 7 percent and the top edge fades in at the lip.

Three materials use it, all alpha-blended with culling off and depth writes off, and the wf_water graph (waterfall/wf_water.procGraph) hangs one curtain from each on a 6.8 by 21.5 grid in the Procgen Effects Showcase world's fx_falls scene:

Materialwidthout_speedspreadseeddensityz_bias
wf_sheet_back9.81.450.2111.1-0.32
wf_sheet_main9.21.70.2231.150
wf_sheet_front7.61.950.26270.80.34

All three use z0 42, base_y 21.9 and height 21.5.

The shader includes fx_noise, zero::scene_depth and zero::scene_color.

Properties

PropertyTypeDefaultMeaning
widthfloat6.6Width of the curtain at the lip (range 0.5 to 40).
heightfloat21.5Height the water falls (range 1 to 80).
z0float0World Z of the lip (range -1000 to 1000).
base_yfloat21.9World height of the lip (range -10 to 100).
out_speedfloat1.7Speed at which the water leaves the lip along -Z (range 0 to 8).
spreadfloat0.22How much wider the curtain is at the bottom, as a fraction of width (range 0 to 1).
seedfloat3Seed for the curtain's noise and sway (range 0 to 99).
densityfloat1.15Multiplies the sheet's body before it becomes alpha (range 0 to 3).
z_biasfloat0.0Shift of the whole curtain along -Z (range -3 to 3); the three curtain materials use -0.32, 0 and 0.34.
vertexBoundsDilationfloat3.5How 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.

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
descriptionFalling waterfall curtain on a ballistic vertex path, with packet-timed ribbons that tear as they fall and refracted background.

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.

10+items
·
shadermodule · born here
❒asset
# fx_noise Procedural noise for effect shaders, as WGSL other shaders include with `#include "fx_noise"`: integer hashes, value and gradient noise in 2D and 3D, fBm and ridged fBm over them, curl noise, and worley (cellular) noise that returns the distance to the nearest feature point and that cell's id. The functions are pure math over their arguments, so a material's fragment shader and a compute shader can both include it and read the same field. Every generator takes an explicit `seed`, so one shader draws several uncorrelated fields from the same coordinates. The hashes mix integers, so a value is the same bit pattern wherever it runs; the float entry points hash a float's bit pattern, with `0.0` and `-0.0` folded together. ```wgsl #include "fx_noise" ``` | Function | Returns | |---|---| | `fx_hash11(x)`, `fx_hash21(p)`, `fx_hash31(p)` | a stable value in [0, 1) for a number or point | | `fx_value_noise2(p, seed)`, `fx_value_noise3(p, seed)` | smooth value noise in [0, 1) | | `fx_gradient_noise2(p, seed)`, `fx_gradient_noise3(p, seed)` | gradient (Perlin-style) noise in [-1, 1], exactly 0 at every integer point | | `fx_fbm2(p, octaves, lacunarity, gain, seed)`, `fx_fbm3(...)` | fractal sum of gradient noise in [-1, 1]: clouds, smoke, rock | | `fx_ridged_fbm3(p, octaves, lacunarity, gain, seed)` | ridged fractal noise in [0, 1]: cracks, crags, veins | | `fx_curl_noise3(p, seed)` | a divergence-free flow vector: swirling smoke and dust | | `fx_worley2(p, seed)`, `fx_worley3(p, seed)` | `{ dist, cell, id }` of the nearest feature point: foam cells, stone, sparkle | | `fx_worley_fbm2(p, octaves, lacunarity, gain, seed)` | fractal cellular noise in [0, 1] | ## Arguments - `p` is an `f32`, `vec2f` or `vec3f` coordinate, matching the function's dimension. - `seed` is a `u32`. - `octaves` is a `u32`, clamped to 1 through `FX_FBM_MAX_OCTAVES` (12). Each octave multiplies the frequency by `lacunarity` and the amplitude by `abs(gain)`, and the fBm functions divide by the summed amplitudes, which keeps the stated range for any gain. Octave `i` uses seed `seed + i * 1013`. ## Building blocks The module also exports the pieces the generators are built from: | Function or item | What it is | |---|---| | `fx_hash_u32(x)`, `fx_hash_u2(x, y)`, `fx_hash_u3(x, y, z)` | Integer avalanche hashes of one, two or three `u32` words, returning a `u32`. | | `fx_unorm(h)`, `fx_snorm(h)` | A hashed `u32` as an `f32` in [0, 1) or [-1, 1), from its top 24 bits. | | `fx_bits(x)` | The `u32` bits of an `f32`, with negative zero folded onto positive zero. | | `fx_hash22(p)`, `fx_hash33(p)` | Two or three decorrelated values in [0, 1) for a 2D or 3D point. | | `fx_lattice_u2(cell, seed)`, `fx_lattice_u3(cell, seed)` | The hashed `u32` a seeded integer lattice corner (`vec2i` or `vec3i`) carries. | | `fx_lattice21(cell, seed)`, `fx_lattice31(cell, seed)` | That corner's value in [0, 1); `fx_value_noise2` at an integer point equals `fx_lattice21` of that point. | | `fx_fade(t)` | The quintic fade `t^3 * (t * (6t - 15) + 10)` used to interpolate across a cell. | | `fx_gradient2(cell, seed)`, `fx_gradient3(cell, seed)` | The unit gradient a seeded lattice corner carries; the 3D one is spread evenly over the sphere. | | `fx_curl_potential3(p, seed)` | The three-component potential `fx_curl_noise3` takes the curl of, by central differences over `FX_CURL_EPSILON` (0.05). | | `fx_cell_point2(cell, seed)`, `fx_cell_point3(cell, seed)` | Where a cell's feature point sits inside the cell, in [0, 1) per axis. | | `fx_cell_id2(cell, seed)`, `fx_cell_id3(cell, seed)` | The id in [0, 1) a cell is tinted by. | | `FxWorley2`, `FxWorley3` | The worley result: `dist` (`f32`), `cell` (`vec2i` or `vec3i`) and `id` (`f32`). | | `FX_TAU` | 2 pi. | `fx_worley2` searches the 3 by 3 cells around the sample and `fx_worley3` the 3 by 3 by 3 cells. `fx_worley_fbm2` sums `1 - dist`, clamped to [0, 1], over its octaves, so feature points read as peaks. ## Used by The waterfall (`wf_particle`, `wf_pool`, `wf_rock`, `wf_sheet`) and wall blast (`blast_puff`, `blast_shock`, `blast_stone`) shaders in this package draw their foam, mist, rock, dust and debris from it, and so does the Procgen Effects Showcase world's `blast_ground`.
▲ 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/waterfall/shaders/wf_sheet.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.