---
id: "fp16-stochastic-rounding-reaction-field"
title: "Coupled Ground Reaction-Front Field with FP16 Stochastic Rounding"
aliases: [FP16 stochastic rounding decay, coupled elemental ground field, stochastically rounded half-float surface PDE]
domain: "simulation"
stage: "simulation"
realtime: "realtime"
platforms: [webgl2, webgpu, desktop-gpu, mobile-gpu, cuda]
year_introduced: 2021
inputs: [texture, particles]
outputs: [texture, material-params]
style: "both"
dynamic: "dynamic"
cost: "cheap"
authority: "Connolly et al., 2021"
url: "https://texelatlas.vercel.app/t/fp16-stochastic-rounding-reaction-field/"
sources_verified_at: "2026-11-30"
---
# Coupled Ground Reaction-Front Field with FP16 Stochastic Rounding (Connolly et al., 2021)

> 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.

## 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

## 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 $\approx 2^{-10} \approx 0.1\%$). At 120–144 Hz, a slow decay with time constant $\tau = 25\,\text{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 use it

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](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](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.

## Cost

cheap — Halves render-target memory and bandwidth versus FP32; combining active bounding-box updates with rotating background row bands keeps a 1024×1024 dual-MRT field well under a fraction of a millisecond on desktop GPUs.

## Failure modes

- 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

## Dataflow

- Inputs: texture, particles
- Outputs: texture, material-params
- Platforms: webgl2, webgpu, desktop-gpu, mobile-gpu, cuda

## Presets

### Dual-MRT FP16 reaction-field partial-update defaults (json-params; parameter preset)

```json
{
  "texture_format": "RGBA16F",
  "mrt_targets": 2,
  "max_active_boxes": 4,
  "rotating_background_bands": 32,
  "slow_decay_tau_seconds": 25
}
```

Attribution: written for this index

## Combines with

- [GPU particle systems](https://texelatlas.vercel.app/t/gpu-particle-systems.md): 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](https://texelatlas.vercel.app/t/deferred-and-projected-decals.md): Floor materials sample the persistent multi-channel reaction texture alongside static decals to blend roughness, emissive glow, and fracture reliefs.

## Combination ideas

- [Narrow-range SSF liquid with whitewater and wet-ground reaction field](https://texelatlas.vercel.app/ideas/narrow-range-ssf-whitewater-ground-field/)

## Sources

1. [primary] Michael P. Connolly, Nicholas J. Higham, Theo Mary (2021) Stochastic Rounding and Its Probabilistic Backward Error Analysis. SIAM Journal on Scientific Computing. https://doi.org/10.1137/20m1334796 (verified via crossref on 2026-11-30)
2. [implementation] Humpalumps (2026) Humpalumps/ultra-elements. https://github.com/Humpalumps/ultra-elements License: MIT. (verified via github on 2026-11-30)

## Cite this entry

Texel. "Coupled Ground Reaction-Front Field with FP16 Stochastic Rounding." https://texelatlas.vercel.app/t/fp16-stochastic-rounding-reaction-field/ (accessed 2026-12-01).
