VoluSys Get started

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.

Two glass windows overlapping: the back window shows softly through the front one.

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():

  1. Finds its distance to the edge using a signed-distance function for the rounded rectangle, and the outward normal there.
  2. Refracts: within the bezel band near the rim, the backdrop is sampled from further inside along the normal, by refraction × (1 − √(1 − u²)) where u goes 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.
  3. Disperses: red, green and blue are sampled at slightly different offsets along the normal, which adds faint colour fringes at the rim.
  4. Frosts: a 4× downsampled, box-blurred copy of the backdrop is blended in according to the blur setting.
  5. Tints: saturation is boosted (vibrancy), then a light or dark tint is mixed in at the material’s frost level.
  6. 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#

KindBlurFrost (tint)Notes
Window×1.40.38Low refraction (×0.35), softer rim
Tray×1.40.38Same material as windows, extra vibrancy
Sidebar×1.30.58Strong frost for legibility
Menu×1.00.50Reduced refraction
Panel×1.00.30Helm tiles
Clear×0.120.06Nearly pure refraction
Bar×0.150.06The 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 glass preview in Settings over a colourful backdrop.

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.