fx_frag_mat
Additive glow material for the burning fragments of the energy-shield effect. `ShieldFx.module` resolves it by name in `M.start` and makes it the material of one of its GPU-instanced pools: a single draw whose instance transforms and lane data the module writes from Luau every fr…
fx_frag_mat
Additive glow material for the burning fragments of the energy-shield effect. ShieldFx.module
resolves it by name in M.start and makes it the material of one of its GPU-instanced pools: a
single draw whose instance transforms and lane data the module writes from Luau every frame.
ShieldFxDriver on the ShieldDome entity in the fx_shield scene starts the effect and steps it
each frame. This material's pool is "frag": up to 90 instances of a faceted octahedron shard with
flat normals. Each impact throws four or more fragments that live 1.8 to 4.2 s, fall under gravity,
bounce off the dome and the ground and spin; lane 0 carries (age / life, 1, seed, 0).
Shader: fx_glow (fx_glow.shader). Its header describes one additive shader for every small
emissive thing in the shield effect: form picks the look, and per-instance lane 0 carries (life
0..1, brightness, seed, 0). The forms are 0 tracer streak, 1 soft flare blob, 2 spark and 3 burning
fragment. The output is the form's colour times brightness times gain, with alpha 1. For form 3
the heat is (1 - life)^1.5; the colour moves from color2 toward a dark red (0.5, 0.05, 0.0) as
the heat falls, is shaded by a fixed facet light and a per-seed flicker, and has color1 * heat * 0.4 added.
Render state: blend: additive, cull: none, depth_write: false.
Properties
form: 3: selects the burning fragment.gain: 1.8: multiplier on the output.color1: { r: 1.0, g: 0.3, b: 0.04, a: 1.0 }: colour added in proportion to the heat.color2: { r: 1.0, g: 0.75, b: 0.3, a: 1.0 }: colour of a freshly hot fragment.
Scoped to this part · feeds back into the world's score.