shockwaveRing
The pressure front a blast pushes out — a ring expanding across a surface from the point it went off, thinning and fading as it runs out to the radius it was given.
effects.play("@builtin::systems.effects.combat.shockwaveRing", {
position = { 0, 0.05, 0 },
params = { radius = 7, expansionRate = 22, normal = { 0, 1, 0 } },
})
The front is drawn on one plane the size of the widest the ring gets, lying across the normal it was given, and the ring's radius is a number on an instance-data lane. Nothing about the geometry grows: the expansion is a lane write per frame.
Parameters
| Parameter | Type | Default | Range | What it changes |
|---|---|---|---|---|
radius | number | 7.0 | 0.25 – 120.0 | How far the front runs before it has gone, in metres. Also the size of the card it is drawn on. |
expansionRate | number | 22.0 | 0.5 – 600.0 | How fast the front travels, in metres per second. The effect lasts radius / expansionRate. |
thickness | number | 0.7 | 0.02 – 20.0 | Thickness of the front, in metres. It thins to 45% of this by the end. |
color | color | {1.0, 0.90, 0.72} | linear 0..1 | Colour of the front. A blast wave runs pale gold, an energy pulse cyan. |
normal | vec3 | {0, 1, 0} | world space | The normal of the surface the front runs across. The ring is drawn on the plane perpendicular to it. |
Cost
<!-- cost: quoted verbatim from effect.yaml -->| gpuMs | vramBytes | measuredOn |
|---|---|---|
| 0.01 | 0 | see effect.yaml |
The size is what the effect's own backends report they hold at a representative
instant — handle:stats().bytes — read identically on every engine, in every
scene and on every repeat: the ring leases one piece of pooled geometry and
holds no simulation state of its own, so it holds no bytes, and what it costs
does not change with the radius. The span is the median of five interleaved
idle/loaded windows of the frame's measured GPU pass sum, which read 0.000 ms
with a spread of about 0.008 ms: the effect costs less GPU time than that
instrument resolves, and 0.01 is the bound the reading supports.
What it draws with
| Asset | Role |
|---|---|
combat/materials/combat_glow | the family's one additive material, drawing its ring form |
combat/glow | the module that leases the card and writes its lanes |
The annulus is a distance field in the card's own UV square and the wobble
around its circumference is value noise from fx_noise, so no texture is
sampled.
See also
@builtin::systems.effects.combat.explosion— the blast this is the front of.guides { path: "topics/visual-effects" }.
Scoped to this part · feeds back into the world's score.