storm_streak
Additive billboard streak for rain, splash droplets and sparks: a card that turns about its own Y axis toward the camera (`zero_billboard_streak`). Colour comes from the element's `data0.rgb`, which is HDR so sparks can run hotter than 1, and an element whose colour fades to blac…
storm_streak
Additive billboard streak for rain, splash droplets and sparks: a card that turns about its own Y
axis toward the camera (zero_billboard_streak). Colour comes from the element's data0.rgb, which
is HDR so sparks can run hotter than 1, and an element whose colour fades to black vanishes (below
0.002 in every channel it is discarded). Across the card the streak is rounded (1 - across^2), so
a thin card shows a soft edge; along it a bright head gives way to a long soft tail. The storm's
lightning lifts every card by ambient + flash * flash_gain, which makes falling rain flicker into
view in every strike. Distance fades the streak by exp(-distance * fog), the streak fades in
between 1.5 and 9 units from the camera, and the result is scaled by gain.
The storm graph (storm/storm.procGraph) builds three additive materials from it:
| Use | flash | flash_gain | ambient | fog | gain |
|---|---|---|---|---|---|
| Rain | storm flash expression | 1.0 | 0.11 | 0.010 | 1.0 |
| Splash droplets | storm flash expression | 1.6 | 0.7 | 0.0045 | 1.0 |
| Sparks and the smaller sparks they throw | 0 | 0.0 | 1.0 | 0.003 | 1.0 |
For each, the graph turns the particle onto its velocity, sets its length from its speed and writes
data0 as a colour times a fade that takes a slow particle to black: wind-driven rain in a cool
blue at random brightness, splash droplets thrown up where rain lands, and strike sparks cooling
from (11, 9, 6) to black. In the Procgen Effects Showcase world, the fx_storm scene plays the graph.
The shader includes @builtin::shaderModules.billboard.
Properties
| Property | Type | Default | Meaning |
|---|---|---|---|
flash | float | 0.0 | Current strike brightness (range 0 to 8). |
flash_gain | float | 1.0 | Multiplies flash (range 0 to 20). |
ambient | float | 1.0 | Base brightness of the streak (range 0 to 8). |
fog | float | 0.006 | Distance fade density (range 0 to 0.1). |
gain | float | 1.0 | Multiplies the output (range 0 to 20). |
vertexBoundsDilation | float | 0.05 | 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 | HDR colour; black discards the element. |
Scoped to this part · feeds back into the world's score.