Log inGet started
World

Procgen Effects Showcase

Branchmain
Branchesmain
Commit99ff90d12c

README.md

fxSmoke

A puff of smoke on a card facing the camera (zero_billboard), for blending over the frame. It draws a soft, lumpy disc of three-octave value noise whose edge is pushed in and out by the noise, and as the puff ages the noise thins it from its wisps inward. It is lit by the ambient light plus the sun, wrapped around a sphere normal under the card so the side toward the sun is brighter. The colour is the element's colour times that light, and the alpha is the density times the element's opacity times gain.

The combat graphs beside it in combat/ draw with it as fxSmoke, transparent. The impact graph uses it for the burst of dust and grit off the struck surface (grit colour (0.58, 0.53, 0.46), opacity falling from 0.55 to 0 over life), and the muzzleFlash graph for the puffs of smoke leaving the bore (grey (0.56, 0.54, 0.52), opacity falling from 0.42 to 0). Both swell the card as it ages. The bench_mixed scene places both graphs and the main scene places muzzleFlash.

The shader includes @builtin::shaderModules.billboard.

Properties

PropertyTypeDefaultMeaning
gainfloat1.0Multiplies the output alpha.
vertexBoundsDilationfloat5How 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.rgbSmoke colour, multiplied by the lighting.
data1.xSeed: picks the puff's lumps.
data1.yLife, 0 at birth to 1 at death: thins the puff and drifts its noise.
data1.zOpacity.