---
title: "Performance"
description: "How rendering is kept cheap, and what has and hasn't been measured."
canonical_url: "https://liquid-glass.bodbod.ir/docs/guide/performance"
---
# Performance

> How rendering is kept cheap, and what has and hasn't been measured.

The aim is that a page with glass on it costs nothing while it's sitting still, and little while it's moving. This is how that works:

- **One WebGL2 context per page.** It is created when the first lens mounts and released when the last one unmounts.
- **On-demand frames.** Idle means no `requestAnimationFrame` calls and no GL calls. The e2e tests check this.
- **The blur is cached.** It's computed once per backdrop change, not once per frame. The glass pass itself reads the texture one to three times per pixel.
- **Off-screen work is skipped.** Lenses outside the viewport and tabs in the background don't render.
- **Resolution is capped.** The device pixel ratio is limited to 1.5 by default. Quality tiers lower it, and reduce blur passes, aberration and frost. `auto` picks a starting tier from device hints such as core count, memory, Save-Data and touch input, steps down if frames stay slow, and never steps back up.
- **Context loss is handled.** Lenses fall back to CSS and recover when the browser restores the context.

The numbers and how they were measured are in [docs/perf.md](https://github.com/MahbodHastam/liquid-glass/blob/main/docs/perf.md). Nothing has been measured on a real phone yet.

## Browser support

WebGL2 is required: Chrome, Edge, Firefox, and Safari 15+ on desktop and iOS. The e2e tests run in Chromium, Firefox and WebKit. Where WebGL2 isn't available you get the CSS `backdrop-filter` fallback.


## Sitemap

See the full [sitemap](https://liquid-glass.bodbod.ir/sitemap.md) for all pages.
