A frosted-glass UI theme and widget library for Dear ImGui, rendered with Direct3D 11. Translucent panels blur the scene behind them in real time using a multi-pass Kawase blur, while custom-drawn widgets add specular highlights, spring-physics animations, and soft shadows — all running in a single lightweight Win32 window.
| Main | Music | Settings |
|---|---|---|
![]() |
![]() |
![]() |
- Real-time Kawase blur — configurable iteration count and offset, applied per-frame on the D3D11 backbuffer
- Optional edge refraction — displacement shader along window borders for an extra glass feel
- Custom glass widgets — Button, Toggle, Checkbox, RadioButton, SliderFloat/Int, ProgressBar, TabBar, and glass-styled wrappers for every standard ImGui input, combo, drag, color, tree, table, and menu widget
- Glass card containers —
BeginGlassCard/EndGlassCardfor grouping content inside blurred panels - Animated background — soft floating blobs behind the UI (disabled automatically on weak hardware)
- Spring-physics interactions — hover scale, press scale, and smooth toggle knob with configurable stiffness and damping
- Cursor-tracking specular highlight — light spot follows the mouse across each widget
- Idle throttling — automatically drops to a low FPS after a configurable inactivity timeout
- Low-power auto-detection — falls back to a simplified render path on WARP / basic display adapters (for VPS)
- High-DPI support — responds to
WM_DPICHANGEDfor per-monitor DPI scaling - Full theme control — every color, alpha, blur parameter, animation speed, and scale factor is exposed in
GlassThemeand tweakable at runtime via the Settings tab
| Tab | Description |
|---|---|
| Main | Widget showcase — buttons, toggles, sliders, inputs, tables, trees, color pickers, and more |
| Music | Apple Music-inspired layout with album cards and a "Now Playing" bar (Demo Tab) |
| Settings | Live controls for accent color, blur iterations, glass alpha, rounding, animation speeds, and performance options |
- OS — Windows 10 or later
- Compiler — MSVC with the v143 toolset (Visual Studio 2022 recommended; 2019 works with v143)
- SDK — Windows 10 SDK
- Graphics — any GPU that supports Direct3D 11 (falls back to WARP automatically)
All third-party code is vendored in the repository — no package manager or extra downloads needed.
- Open
GlassUI.slnin Visual Studio. - Select a configuration (Debug or Release) and platform (x86 or x64).
- Build the solution (
Ctrl+Shift+Bor Build → Build Solution). - Run with
F5, or find the executable in the output directory (e.g.x64/Release/GlassUI.exe).
GlassUI.sln
GlassUI/
├── GlassUI.cpp # Win32 entry point, D3D11 setup, main render loop
├── gui.h / gui.cpp # UI layer — BuildUI, glass cards, demo tab content
├── glass_effect.h # Kawase blur & edge refraction (D3D11 shaders)
├── glass_widgets.h/cpp # Custom-drawn glass widgets + ImGui wrappers
├── ui_theme.h # GlassTheme — all color tokens & tuning parameters
├── ui_style.h # UIStyle — base Dear ImGui style overrides
├── stb_image.h # stb_image (vendored)
└── imgui/ # Dear ImGui 1.92.1 with Win32 + DX11 backends
Replace ImGui:: calls with GlassUI:: to get glass-styled versions:
#include "glass_widgets.h"
// Custom-drawn glass button with blur, highlights, and spring animation
if (GlassUI::Button("Click me"))
DoSomething();
// Glass toggle switch
static bool enabled = false;
GlassUI::Toggle("Feature", &enabled);
// Glass slider
static float value = 0.5f;
GlassUI::SliderFloat("Amount", &value, 0.0f, 1.0f);
// Standard ImGui widgets automatically wrapped with glass frame styling
static char buf[128] = "";
GlassUI::InputText("Name", buf, sizeof(buf));All visual parameters live in GlassTheme (ui_theme.h) and can be changed at runtime:
#include "ui_theme.h"
GlassTheme::g_blurIterations = 6; // more blur passes
GlassTheme::g_glassAlpha = 0.40f; // more opaque panels
GlassTheme::g_glassRounding = 24.0f; // rounder corners
GlassTheme::g_hoverScale = 1.03f; // stronger hover pop
GlassTheme::g_springStiffness = 200.0f; // snappier spring| Component | Details |
|---|---|
| Dear ImGui | v1.92.1 — immediate-mode UI |
| Direct3D 11 | Rendering, blur, and refraction shaders |
| Win32 | Window, input, DPI, drag-and-drop |
| stb_image | JPEG/PNG loading |
| C++17 | Language standard |


