The native runtime for three.js: three.js, down to the metal. 45× smaller than Electron, on a Sony PS3, and path-traced at 60 fps on ray-tracing GPUs.
ThreeRT Live 3D Wallpaper for Omarchy — Benchmark & Design Report
Scene: Omarchy Orbital — Living Earth (4K NASA Blue Marble / Black Marble / Elevation+Roughness+Cloud maps, two-layer drifting cloud deck with surface shadows, Rayleigh/twilight atmospheric scattering, multi-spectral starfield, Omarchy
colors.tomltheme harmonization)
Hardware: ThinkPad X1 Nano (x1nano-omarchy), Intel Iris Xe Graphics (TGL GT2, Vulkan),2160×1350 @ 60Hz(1440×900logical,1.5×scale), Hyprland Wayland
Raw dataset:docs/benchmark-results.json
Reproduce:node webgpu/wallpaper/bench/bench.mjs --duration 12
Screenshots (not committed):
earth-preview.png(2160×1350 native WebGPU) andearth-americas.png, in doodlewind/ThreeRT-dev#8
1. Architecture & Omarchy Integration
Omarchy ships a native video wallpaper engine (omarchy/owe, libmpv over wlr-layer-shell) and exposes omarchy-shell background setSuspended true|false in Background.qml so external wallpaper engines can seamlessly take over Wayland's Layer::Background. OWE only decodes video/GIF/stills, whereas real-time 3D/Three.js wallpapers on Linux have typically required embedding a full Chromium/WebView stack.
threert-wallpaper runs standard three.js WebGPURenderer + TSL scenes directly on threert-jsc + threert-webgpu (wgpu over Vulkan) in a single 7.4 MiB native process:
- Low-power GPU profile (
webgpu/src/gpu.rs):PowerPreference::LowPower+MemoryHints::MemoryUsage. - Zero-blit Wayland
wlr-layer-shellswapchain (src/wayland.rs): Direct swapchain rendering (blitted_frames = 0) withwp_viewporterfractional HiDPI andfloor()physical sizing matchingthree.js. - Event-driven Hyprland occlusion auto-pause (
src/hypr.rs): Blocks on$XDG_RUNTIME_DIR/hypr/.../.socket2.sockwith zero polling; pauses JSrAF+ GPU submission on aCondvarwhenever a fullscreen/tiled window covers the workspace or DPMS turns off. - Omarchy lifecycle & live theme sync (
src/omarchy.rs): RAIIomarchy-shell background setSuspendedguard + livecolors.tomlwatcher (globalThis.__wallpaper.onThemeChange).
2. Apples-to-Apples Methodology
- Identical scene & bundle: Both
threert-wallpaperandChromium 155.0.8059.84execute the exact same minified854 KiBwallpaper-demo.jsbundle and decode the same three 4K NASA JPEG assets (earth_day_4096.jpg,earth_night_4096.jpg,earth_bump_roughness_clouds_4096.jpg). - Identical hardware backend: Both verified
backend=WebGPUover Vulkan (Intel Iris Xe). - Identical physical resolution & FPS: Both locked to
2160×1350at 60fps (58.1 vs 59.7 fps) and1620×1012at 30fps (28.1 vs 29.9 fps). - Leanest Chromium baseline:
--app, fresh--user-data-dir,--disable-extensions,--disable-sync,--disable-background-networking,--ozone-platform=wayland --enable-unsafe-webgpu --enable-features=Vulkan. - Objective OS/hardware metrics: Full process-tree PSS/RSS from
/proc/<pid>/smaps_rollup, CPU% from/proc/<pid>/stat, context switches (wakeups/s) from/proc/<pid>/status, and Intel DRM hardware counters (rc6_residency_ms&rps_act_freq_mhz).
3. Benchmark Results (4K Living Earth)
Idle desktop baseline prior to run: Intel iGPU 12.75% active, 23.4 MHz avg clock.
| Metric | ThreeRT (threert-wallpaper) |
Chromium 155 WebGPU | ThreeRT Advantage |
|---|---|---|---|
| Binary Size | 7.4 MiB | 317 MiB | 42.8× smaller |
| OS Processes / Threads | 1 / 19 | 10 / 107 | 10× fewer procs / 5.6× fewer threads |
| Cold-Start TTFF (median of 3, incl. 3× 4K JPEG decode) | 574.8 ms (562–575 ms) |
704.9 ms (695–762 ms) |
1.23× faster (-18%) |
Active 60 FPS (2160×1350, Vulkan WebGPU) |
|||
| ↳ Process-Tree CPU % | 15.56% (P50 frame 2.16 ms) | 39.87% | 2.56× lower CPU (-61%) |
| ↳ Wakeups / sec (ctxt switches) | 95.8 / s | 909.3 / s | 9.49× fewer wakeups (-89.5%) |
| ↳ Memory PSS / RSS | 232.2 MiB / 247.7 MiB | 483.7 MiB / 1,266.8 MiB | 2.08× lower PSS / 5.11× lower RSS |
↳ Intel iGPU Active (100% − RC6) |
55.68% | 69.17% | -13.5 pp (-19.5% GPU active) |
| ↳ Intel iGPU Avg Clock | 444.8 MHz | 522.3 MHz | -77.5 MHz (-15% GPU clock) |
| ↳ Direct Swapchain Blits | 0 / 934 frames | Multi-process compositor copy | 100% zero-blit |
Battery 30 FPS (1620×1012, Vulkan WebGPU) |
|||
| ↳ Process-Tree CPU % | 7.10% (P50 frame 1.61 ms) | 21.03% | 2.96× lower CPU (-66%) |
| ↳ Wakeups / sec (ctxt switches) | 36.5 / s | 654.4 / s | 17.9× fewer wakeups (-94.4%) |
| ↳ Memory PSS / RSS | 218.9 MiB / 234.3 MiB | 481.2 MiB / 1,253.5 MiB | 2.20× lower PSS / 5.35× lower RSS |
| ↳ Direct Swapchain Blits | 0 / 450 frames | Multi-process compositor copy | 100% zero-blit |
| Occluded Desktop (Window Covering Workspace) | |||
| ↳ Process-Tree CPU % | 0.00% | (keeps running w/o WM hooks) | Zero CPU |
| ↳ Wakeups / sec | 2.1 / s | (654–909 / s unpaused) | ~310–430× fewer wakeups |
↳ Intel iGPU Active (100% − RC6) |
3.04% (97.0% RC6 deep sleep) | (54–69% active) | Near-zero GPU |
| ↳ Intel iGPU Avg Clock | 2.1 MHz | (256–522 MHz) | Idle GPU |
| ↳ Memory PSS | 207.9 MiB | 481.2 MiB | 2.31× lower PSS (-57%) |
4. Key Takeaways
- Zero browser IPC & compositor tax: At full native
2160×1350 @ 60fpson a 4K-textured Earth, ThreeRT spends only 2.16 ms P50 CPU/frame (15.56%total CPU vs Chromium's39.87%) with 0 intermediate blits (934/934direct frames), cutting PSS memory in half (232vs484 MiB) and RSS by over 5× (248vs1,267 MiB). - Dramatically better battery pacing at 30 FPS: Chromium's 10-process compositor still wakes at 60Hz VSync (
654.4 wakeups/s,21.0%CPU) even when JS throttles to 30fps. ThreeRT's host pacer genuinely sleeps between frames (36.5 wakeups/s,7.1%CPU — 17.9× fewer wakeups and 2.96× lower CPU). - True zero-cost occluded state: During normal coding when tiled/fullscreen windows cover the desktop, Hyprland occlusion auto-pause drops ThreeRT to
0.00%CPU,2.1 wakeups/s,3.04%iGPU active (2.1 MHz, 97% RC6 sleep).