shield_dome
An energy-shield dome: a glowing hexagonal lattice over a hemisphere that ripples, dents and flares where shots land, crackles with arcs along its base, and flickers toward magenta-white as it is overloaded. Hits arrive as twelve float4 material properties, and everything (hex la…
shield_dome
An energy-shield dome: a glowing hexagonal lattice over a hemisphere that ripples, dents and flares where shots land, crackles with arcs along its base, and flickers toward magenta-white as it is overloaded. Hits arrive as twelve float4 material properties, and everything (hex lattice, ripples, flares, strain flicker, base arcs) is evaluated per pixel each frame.
The vertex stage moves each vertex along its direction from the centre: a dent of up to 0.16 times
the hit's strength at the impact, decaying quickly, and a smaller swell that travels outward across
the dome as the hit ages. The fragment stage projects the direction from the dome's centre onto a
plane through p.xz / (1 + p.y), a conformal projection that keeps the hex cells hexagonal, at
hex_scale cells per unit. On that lattice it draws:
- a faint cell fill that pulses per cell, and lattice edges brightened by a slow scan that drifts up the dome and by heat;
- a fresnel rim;
- for each live hit, a fine shock ring and a wave quantised to whole hex cells, both expanding outward with age, a bright bloom at the impact, and a lingering heat patch;
- cells that strobe at 16 steps a second as heat rises;
- jagged arcs hugging the ground and short bolts rising off it, gated more open by heat;
- a whole-shield stutter at 27 steps a second and a shift toward magenta-white under strain.
Back faces draw at 0.55 brightness. The alpha is 1; the material blends it additively.
The shield_dome_mat material (additive, culling off, depth writes off, hex_scale 12) uses it on
the shield_dome_mesh hemisphere in the fx_shield scene. The ShieldFx module, run by the
ShieldFxDriver component, sets center once at start and writes the twelve hits and the strain
every frame; ground_arcs reads the same table on the ground around it.
Properties
| Property | Type | Default | Meaning |
|---|---|---|---|
tint | color | [0.08, 0.55, 1.0, 1.0] | Base energy colour of the cells, lattice and rim. |
hot | color | [0.75, 0.95, 1.0, 1.0] | Hot colour of the shock rings and impact blooms, mixed into the cell wave, strobes and base arcs. |
center | float4 | [0, 0, 0, 9] | xyz: world position of the dome's centre, which the fragment stage measures directions from. ShieldFx writes the dome's radius into w. |
hex_scale | float | 9.0 | Hex cells per unit of the projected plane (range 2 to 30). |
strain | float | 0.0 | Overload of the shield, range 0 to 3, read as strain / 2.5 clamped to 1. |
hit0 to hit11 | float4 | [0, 1, 0, -1] | One recent hit each. xyz: unit direction from the dome's centre times the hit's strength; w: age in seconds. A negative age, or one above 3.5, marks the slot idle. |
vertexBoundsDilation | float | 2.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 is not culled. |
Scoped to this part · feeds back into the world's score.