fx_glow
One additive shader for every small emissive thing in the energy-shield effect. The material's `form` picks the look, and the per-instance lane 0 carries life, brightness and seed. It shades the 3D meshes the `ShieldFx` module builds: the brightness falls off with the angle betwe…
fx_glow
One additive shader for every small emissive thing in the energy-shield effect. The material's
form picks the look, and the per-instance lane 0 carries life, brightness and seed. It shades the
3D meshes the ShieldFx module builds: the brightness falls off with the angle between the surface
normal and the view direction, so each mesh reads as a glowing volume with soft edges. The output
colour is multiplied by the lane's brightness and the material's gain.
- Form 0, tracer streak: along a tapered prism (
uv.x0 at the pointed tail, 1 at the blunt head) the colour runs fromcolor1in the long fiery tail to a white-hotcolor2head. - Form 1, soft flare blob: a hot
color2core inside acolor1halo, fading with the square of the remaining life. - Form 2, spark: bright along the head of the prism, moving from
color2while hot tocolor1as it cools, and fading with life. - Form 3, burning fragment: a faceted ember that cools from
color2to dark red with a flicker whose rate comes from the seed, plus a faintcolor1glow.
The ShieldFx module draws the effect with four materials made from it, all additive with culling
off and depth writes off: fx_streak_mat (form 0, gain 1.0) on the incoming tracers, fx_flare_mat
(form 1, gain 1.0) on the impact flares and the flashes where each tracer starts, fx_spark_mat
(form 2, gain 1.8) on the sparks, and fx_frag_mat (form 3, gain 1.8) on the burning fragments.
Each pool is one GPU-instanced draw whose lane 0 the module writes every frame: the tracer prism, a
sphere for flares, the prism again for sparks, and an octahedron shard for fragments. The
ShieldFxDriver component runs the module in the fx_shield scene.
Properties
| Property | Type | Default | Meaning |
|---|---|---|---|
form | float | 0.0 | Look selector, range 0 to 4: below 0.5 tracer, below 1.5 flare, below 2.5 spark, otherwise burning fragment. |
color1 | color | [1.0, 0.45, 0.1, 1.0] | The cooler colour: tracer tail, flare halo, cooled spark, fragment glow. |
color2 | color | [1.0, 0.9, 0.7, 1.0] | The hot colour: tracer head, flare core, hot spark, hot fragment. |
gain | float | 1.0 | Multiplies the output colour (range 0 to 20). |
Lanes
| Lane | Carries |
|---|---|
data0.x | Life, 0 to 1: fades the flare and cools the spark and fragment. |
data0.y | Brightness, multiplied into the output. |
data0.z | Seed: the fragment's flicker rate and phase. |
data0.w | 0. |
ShieldFx writes (0, 1, 0, 0) for tracers, (age / life, 1, 0, 0) for flares and sparks, and (age /
life, 1, seed, 0) for fragments.
Scoped to this part · feeds back into the world's score.