fxSpark
A spark: a card turned onto its element's motion and stretched along it (`zero_billboard_streak`), drawn as a white-hot core fading to its colour at the rim and tapering to a point at both ends. The width across the streak follows `1 - along^2`, so the card is widest at its middl…
fxSpark
A spark: a card turned onto its element's motion and stretched along it (zero_billboard_streak),
drawn as a white-hot core fading to its colour at the rim and tapering to a point at both ends. The
width across the streak follows 1 - along^2, so the card is widest at its middle; pixels outside
that width are discarded. The body carries the element's colour, and a white core is added on the
axis, scaled by the colour's brightest channel (capped at 4) times 0.35. The result times gain is
added to the frame.
The combat graphs beside it in combat/ draw with it as fxSpark, additive. The
impact graph uses it for the sparks thrown back off the struck surface, the muzzleFlash graph
for the burning powder streaking out of the bore, and the tracer graph for the round's white-hot
streak and the embers it sheds. Each graph turns the particle onto its velocity, lengthens its Y
scale, and colours it from an HDR ramp that cools over its life. The bench_mixed scene places all
three 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 colour. |
vertexBoundsDilation | float | 0.3 | 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 | The element's colour in linear HDR. |
Scoped to this part · feeds back into the world's score.