Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

README.md

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:

Useflashflash_gainambientfoggain
Rainstorm flash expression1.00.110.0101.0
Splash dropletsstorm flash expression1.60.70.00451.0
Sparks and the smaller sparks they throw00.01.00.0031.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

PropertyTypeDefaultMeaning
flashfloat0.0Current strike brightness (range 0 to 8).
flash_gainfloat1.0Multiplies flash (range 0 to 20).
ambientfloat1.0Base brightness of the streak (range 0 to 8).
fogfloat0.006Distance fade density (range 0 to 0.1).
gainfloat1.0Multiplies the output (range 0 to 20).
vertexBoundsDilationfloat0.05How 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; black discards the element.