Coupled Ground Reaction-Front Field with FP16 Stochastic Rounding
Evolve multi-channel persistent surface reaction fronts (heat, char, wetness, frost, cracks) in bandwidth-efficient RGBA16F ping-pong targets, using per-texel stochastic rounding so slow high-frame-rate exponential decays never stall on 10-bit mantissa quantization.
Also known as FP16 stochastic rounding decay, coupled elemental ground field, stochastically rounded half-float surface PDE
In the family Simulation & animation, coupled surface fields
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | No built-in fp16 stochastically rounded ground reaction-front field solver; requires custom ping-pong render targets or WebGPU compute. |
| Babylon.js 9.38.0 | None found | |
| Godot 4.7 | None found | No built-in fp16 stochastically rounded ground reaction-front field solver. |
| Unity | None found | No built-in fp16 stochastically rounded ground reaction-front field solver. |
| Unreal 5.7 | None found | No built-in fp16 stochastically rounded ground reaction-front field solver. |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
Real-time arenas often track coupled persistent ground effects—heat melting frost into wetness, wetness quenching fire, frost creeping along crystalline veins, or cracks radiating outward—in world-aligned ping-pong MRT textures. Storing eight channels in RGBA16F halves memory bandwidth relative to RGBA32F, but IEEE half-precision floats have only 10 mantissa bits (a minimum relative step of ≈ 2-10 ≈ 0.1%). At 120–144 Hz, a slow decay with time constant τ = 25 s changes a texel by roughly 0.03% per frame, which round-to-nearest hardware silently snaps back to the old value—causing permanent stagnation.
Stochastic rounding (Connolly, Higham & Mary 2021) eliminates this stagnation in expectation without switching to FP32. When writing a decayed value x between adjacent FP16 representable levels x_- and x_+, the shader adds a uniform hash-based dither offset proportional to the local FP16 ULP before quantizing, rounding up with probability (x - x_-)/(x_+ - x_-) and down otherwise. Averaged over frames and neighboring texels, the decay remains unbiased and smooth across any refresh rate.
To stay within tight frame budgets at high resolutions, active impact regions are clustered into a few bounding boxes stepped every frame while inactive areas update via rotating row bands using accumulated dt, with directional masks gating propagating fronts.
When to choose it
Reach for it when
- reaction-diffusion or wetness pde freezes solid when stored in fp16 textures
- small per-frame simulation increments underflow to zero in half float buffers
- cut fluid or chemical field memory bandwidth in half without stalling evolution
- eliminate visible quantization banding in slow-evolving fp16 gpu simulations
- preserve long-term diffusion conservation using randomized rounding on half floats
Choose it when maintaining large, multi-channel interactive ground or surface state textures (scorch, snow, frost, wetness, corrosion) in FP16 on bandwidth-bound desktop or mobile GPUs at high refresh rates.
Prefer Deferred and projected decals when effects are isolated stamps that do not chemically react, diffuse, or propagate into neighboring texels. Prefer Gray-Scott reaction-diffusion when simulating organic Turing pattern synthesis rather than gameplay-coupled state channels. Prefer FP32 storage when exact deterministic per-texel precision is required and bandwidth headroom allows.
Field marks
- High-frequency spatial hash noise from stochastic rounding can become faintly visible if the field is rendered directly without material filtering or mask modulation
- Rotating-band partial updates cause non-active areas to decay in subtle staggered sweeps if band count is too high or accumulated dt is large
- Fixed world-aligned textures waste resolution on distant terrain unless clipped to a bounded arena or scrolled as a toroidal clipmap
- Over-tight baked mask thresholds can trap propagating frost or crack fronts in fragmented isolated islands
Presets
Dual-MRT FP16 reaction-field partial-update defaults
{
"texture_format": "RGBA16F",
"mrt_targets": 2,
"max_active_boxes": 4,
"rotating_background_bands": 32,
"slow_decay_tau_seconds": 25
}Attribution: written for this index
Crosses
- Narrow-range SSF liquid with whitewater and wet-ground reaction field: A complete real-time particle liquid pipeline from turbulent splash to stained wet ground. Position-based fluid particles spawn physically classified spray, foam, and bubbles; a narrow-range screen-space filter turns the particle depth into a smooth glass-like surface without silhouette halos; and water contact drives an fp16 stochastically rounded ground reaction field that absorbs, spreads, and dries smoothly without quantization stall.
- GPU particle systems: Floor-contacting particles render additively into a cleared paint target that injects heat, wetness, frost, or acid straight into the reaction field.
- Deferred and projected decals: Floor materials sample the persistent multi-channel reaction texture alongside static decals to blend roughness, emissive glow, and fracture reliefs.
Sources
- primaryMichael P. Connolly, Nicholas J. Higham, Theo Mary (2021). Stochastic Rounding and Its Probabilistic Backward Error Analysis. SIAM Journal on Scientific Computing.Verified via crossref · 2026-11-30doi:10.1137/20m1334796
- implementationHumpalumps (2026). Humpalumps/ultra-elements. Real-time elemental spell VFX lab for three.js (WebGL2): 39 tunable spellsGitHub API · license MIT · 2026-11-30