back home

blog

a pane in the glass — part 2: apple's beautiful lie

seriesa pane in the glasssnell's law to webgl, one pane at a time
  1. ○part 0the setup
  2. ○part 1why light slows down
  3. →part 2apple's beautiful lie
  4. ○part 3webgl: the real thing

In Part 1 we established what glass actually does: it refracts (Snell's law), it reflects (Fresnel equations), it disperses (Abbe number). Real glass spatially displaces the image behind it. The displacement depends on the surface curvature, the refractive index, and the wavelength of each ray.

Apple's UIBlurEffect does approximately none of this. And it looks great. That tension is worth examining closely.

What UIBlurEffect actually does

The frosted glass effect — the translucent navigation bar, the Control Center sheet, the share panel — is a simulation of ground glass. Ground glass is ordinary glass whose surface has been mechanically roughened. Instead of a sharp transmitted image, the roughness scatters light in random directions, producing a diffused, blurred view of whatever is behind it.

The simulation does four things:

  • Gaussian blur of the content beneath. This is the scatter term — a rough surface averages the incoming light over a cone of directions, which is mathematically equivalent to a convolution with a Gaussian kernel. Higher blur radius = rougher surface.
  • Saturation adjustment. Real frosted glass desaturates slightly because scattered light mixes colors from a wide area. Apple typically boosts saturation slightly to compensate for the grey wash the blur introduces — the final effect is punchier than physically accurate.
  • Luminance tint. Real glass transmits ambient light as a broadband luminance boost. UIBlurEffect adds a semi-transparent white or dark overlay to simulate this, and adjusts it for light vs. dark mode.
  • A sharp element boundary. The panel itself has a crisp edge while its interior is blurred. This edge contrast is the strongest cue that a physical material boundary exists here.
The system also applies vibrancy — a color blending mode that makes the content inside the blur region interact with the colours beneath it. This is closer to a compositing operation than a physics simulation, but it reinforces the "glass" reading by making the panel feel permeated by its surroundings rather than simply placed on top of them.

What it deliberately skips

The conspicuous absence is spatial refraction. Real glass moves the image behind it. UIBlurEffect blurs the image in place — no pixel is displaced, no spatial shift occurs. This is physically wrong.

It also skips dispersion entirely. There's no chromatic aberration, no wavelength-dependent bending. The blur is achromatic — red, green, and blue are spread identically.

And the Fresnel term is approximated by a static overlay rather than computed per fragment. The rim brightening you see on iOS panels is a fixed gradient, not a function of viewing angle. Turn your phone — the highlight doesn't move.

Why the brain accepts it anyway

The visual system doesn't run Snell's law. It matches patterns to learned material categories. The pattern "soft blurred content behind a sharp edge with a faint luminance boost" maps strongly to "translucent material" in human visual memory, and the brain fills in the rest.

The specific shortcuts Apple takes are well chosen for this reason. Spatial displacement would be the most physically correct addition, but it's also the one the visual system is worst at detecting at UI scale — the displacement on a typical panel is a few pixels at most, below the threshold of casual notice. The Fresnel rim highlight, by contrast, is something humans are very sensitive to — it's the difference between "flat plastic" and "glass" at a glance — so even the faked static version is worth including.

This is why visionOS glass feels more present than iOS glass. The spatial parallax as you move your head means the Fresnel term has to be view-dependent — you'd immediately notice a static highlight that doesn't track your position. So visionOS computes a real-time Fresnel response per frame, and adds a subtle spatial offset of the content behind the panel as head position changes. Still not full refraction, but much closer to the physics.

The performance reason

There's also a straightforward engineering answer for why refraction is skipped: Gaussian blur can be computed at half or quarter resolution and upscaled, which is cheap. Spatial refraction requires sampling the background at per-pixel offset UV coordinates — you need the full-resolution background buffer, and you need to look up a different location for every output pixel. On a phone running at 120Hz with a dozen composited layers, that cost adds up fast.

The WebGL approach in Part 3 has this cost — three texture samples per fragment per channel, times however many pixels the glass element covers. For a full-screen panel this is genuinely expensive. For a button or a pill it's trivial. Scale matters.

Up next: we stop apologising for shortcuts and implement the real thing. Part 3 is the WebGL shader, annotated line by line.