WindowServer & Volu Glass
Every translucent surface in VoluSys (windows, sidebars, the Tray, menus, Helm) is drawn by one function, glass_draw(), with a material preset for each kind of surface.

The frame loop#
The compositor is damage-driven. When a window changes, its bounds are marked dirty, and each frame redraws only the dirty rectangles: wallpaper, then each window from back to front (shadow, glass backdrop, content, traffic lights), then the shell (menu bar, Tray, menus) and the cursor. Finished areas are flushed to the write-combined framebuffer.
Window glass samples a glass-free version of the scene, so stacked windows don’t compound their frost. A coverage mask lets a back window keep its outline and some of its tone when seen through a front window.
Anatomy of the material#
For every pixel inside a rounded rectangle, glass_draw():
- Finds its distance to the edge using a signed-distance function for the rounded rectangle, and the outward normal there.
- Refracts: within the bezel band near the rim, the backdrop is sampled from further inside along the normal, by
refraction × (1 − √(1 − u²))whereugoes from 0 inside the bezel to 1 at the rim. That curve is the profile of a convex lens, so straight lines behind the glass bend near its edges. - Disperses: red, green and blue are sampled at slightly different offsets along the normal, which adds faint colour fringes at the rim.
- Frosts: a 4× downsampled, box-blurred copy of the backdrop is blended in according to the blur setting.
- Tints: saturation is boosted (vibrancy), then a light or dark tint is mixed in at the material’s frost level.
- Lights the rim: a hairline specular highlight plus a faint inner glow, strongest where the edge faces the top-left/bottom-right light axis.
Material presets#
| Kind | Blur | Frost (tint) | Notes |
|---|---|---|---|
| Window | ×1.4 | 0.38 | Low refraction (×0.35), softer rim |
| Tray | ×1.4 | 0.38 | Same material as windows, extra vibrancy |
| Sidebar | ×1.3 | 0.58 | Strong frost for legibility |
| Menu | ×1.0 | 0.50 | Reduced refraction |
| Panel | ×1.0 | 0.30 | Helm tiles |
| Clear | ×0.12 | 0.06 | Nearly pure refraction |
| Bar | ×0.15 | 0.06 | The transparent menu bar |
The defaults are blur 20, refraction 18, frost 0.18, dispersion 0.4 and rim 0.75. All of them can be changed in Settings ▸ Volu Glass. Reduce transparency replaces every material with a near-opaque tint and turns off refraction.

The website’s glass#
This website imitates the same material in CSS: backdrop-filter for blur and vibrancy, a gradient-masked hairline for the rim, and, in Chromium-based browsers, an SVG displacement map that js/site.js generates with the same lens profile for refraction and dispersion. Where that isn’t supported, or when you ask for reduced transparency, it falls back as VoluSys does.