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 ambie…
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
| Property | Type | Default | Meaning |
|---|---|---|---|
gain | float | 1.0 | Multiplies the output alpha. |
vertexBoundsDilation | float | 5 | 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 | Smoke colour, multiplied by the lighting. |
data1.x | Seed: picks the puff's lumps. |
data1.y | Life, 0 at birth to 1 at death: thins the puff and drifts its noise. |
data1.z | Opacity. |
Scoped to this part · feeds back into the world's score.