Skip to content
Andrew Voirol
Sunday, November 1, 2026drop-of-blood-build

Fixing the Apple Silicon XDR gamma crush and red sonar echo

WebGPUApple SiliconShaders

Enabling WebGPU rgba16float with toneMapping: { mode: 'extended' } on a MacBook Pro XDR display unexpectedly crushed the entire water tank three stops dark. Headless SDR screenshots looked normal because they fell back to bgra8unorm, but macOS extended-sRGB swapchains apply the piecewise IEC 61966-2-1 sRGB transfer curve across [0, 1] while leaving values above 1.0 unclipped for specular headroom — feeding raw linear radiance straight out of tone mapping darkened midtones by ~3×. Encoding linearToSRGB(mapped) + edrBoost restored 1:1 SDR midtone parity (maxMidtoneSdrDiff = 0.0033) while pushing meniscus highlights to 1.32× EDR peak. In the same live audit I killed two subtle multi-drop bugs: an outer eta * sponge wave clamp was bouncing circular drumhead echoes inward across clear water, and meniscus blood tinting wasn't gated by surface contact, making clear ripples pulse red whenever they crossed over an older submerged plume (clearWaterRedRipplePx -> 0).

← Previous

Why Rapier 0.21 broke an 18-story glass tower (and adding Apple XDR)

Next →

Turning a Kentucky hike photo into a WebGPU paper world


Andrew Voirol

Builder, hacker, shipper. Currently leaving localhost.

Navigate

WorkThreadsBuilder's LogAboutContactRSS Feed

Connect

X / TwitterGitHubLinkedIn

© 2026 Andrew Voirol·Back to top ↑
✦Just one prompt away from figuring it all out.