wlrfx project · MIT licensed
scenefx
The wlroots scene API, with the eye candy left in.
scenefx is a drop-in replacement for the wlroots scene API. It swaps the plain wlr renderer for an fx renderer that draws blur, drop shadows, and rounded corners as part of the normal scene commit — so a compositor keeps the scene graph's simplicity without giving up those effects.
How it works
wlroots' scene API already solves the hard part of compositing: it manages a tree of nodes, tracks damage, and hands you a finished frame. The catch is that it renders through wlr_renderer, which is intentionally minimal — no blur, no shadows, no rounded corners. Getting those meant abandoning the scene API and writing a renderer from scratch.
scenefx removes that trade-off. It keeps the same scene-node types and function names as wlroots' own scene API — wlr_scene_create, wlr_scene_tree_create, wlr_scene_buffer_create, and so on — but backs them with its own fx renderer, so effects are drawn as part of the normal scene commit, with damage tracking and culling still handled for you.
| Without scenefx | With scenefx |
|---|---|
| 1. wlr_scene node tree | 1. wlr_scene node tree |
| 2. wlr_renderer | 2. fx renderer |
| 3. flat, undecorated output | 3. blur, shadow, rounded corners |
Full walkthrough, including a build snippet and a basic usage example: Using scenefx in your project →
Effects
- Background blur
- Translucent surfaces sample and blur what's behind them, per-node, so panels and floating windows can read as glass instead of a flat overlay.
- Drop shadows
- Soft shadows give floating and stacked windows real depth, rendered alongside the surface instead of faked with a compositor-side hack.
- Rounded corners
- Corners are clipped in the renderer itself, so they stay correct under resize, damage tracking, and direct scanout.
Compositors using scenefx
scenefx already renders the eye candy in a handful of wlroots-based compositors, from full window managers to minimal ones running a patch.
| Compositor | Notes |
|---|---|
| SwayFX | sway, with eye candy |
| Mango | wlroots compositor |
| Umbriel | wlroots compositor |
| nauka | wlroots compositor |
| mwc | wlroots compositor |
| dwl | via patch |
- Using scenefx in your project — adding it as a dependency and basic API usage
- Compiling from source — dependencies and build commands
- Debugging — environment variables and Tracy profiling