Procgen Effects Showcase
- ..
- .metadata278 B
- README.md2.6 KB
- preview.png2.0 KB
- properties.yaml152 B
- shader.wgsl4.4 KB
README.md
blast_puff
Soft, domain-warped-fBm sprite used for the blast's fire (mode 0, additive) and lit smoke and dust
(mode 1, alpha). Each particle is a camera-facing card (zero_billboard) cut to a disc and turned
by its seed. Two-octave fx_noise fBm warps the coordinates, a four-octave fBm and a finer
two-octave fBm erode the disc from the rim, and the domain drifts with the particle's life so the
edge curls as it ages. Per-particle colour, life, seed and glow arrive on data0/data1. The
sprite is depth-faded against the scene (soft particles) over 1 unit wherever a surface lies behind
it; over the sky it keeps its full opacity.
- Mode 0 (fire) is brightest in the dense middle: the colour runs from 0.55 of the lane colour at
the thin edge to 1.25 of it plus a warm
(0.5, 0.32, 0.12)boost scaled by glow at the core. It returns the colour multiplied by its coverage, for additive blending. - Mode 1 (smoke and dust) lights a sphere normal bumped by the noise: wrapped sun light, half the
ambient light, a rim catching the sun, self-shadowing from the noise, and an orange fire
underlight
(1.0, 0.4, 0.09)that grows with the square of glow on the underside and core. - A mode above 1.5 draws a debug ramp from blue to orange over world height 0 to 14.
The wall_blast graph (blast/wall_blast.procGraph) builds two materials from it: fire_mat (mode
0, additive) for the fireball and the white flash cards, and smoke_mat (mode 1, transparent) for
the smoke column and cap, the smoke trailing behind flying rock, the dust puffs where rock lands and
the dust ring rolling along the ground. The graph sizes each card from the particle's size and life
and writes data1 as (life, a random value, a glow ramp over life, a constant erode bias).
The shader includes @builtin::shaderModules.billboard, fx_noise and zero::scene_depth.
Properties
| Property | Type | Default | Meaning |
|---|---|---|---|
mode | float | 0 | Look selector, range 0 to 1: below 0.5 fire, 0.5 to 1.5 smoke and dust. |
vertexBoundsDilation | float | 34 | How 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
| Lane | Carries |
|---|---|
data0.rgb | Colour; HDR for fire. |
data0.a | Peak opacity. |
data1.x | Life, 0 at birth to 1 at death; drifts the noise domain. |
data1.y | Seed: turns the card and offsets the noise. |
data1.z | Glow 0 to 1: the fire core boost in mode 0 and the fire underlight in mode 1. |
data1.w | Erode bias, subtracted from the shape so a larger value thins the puff. |