updated 2026-11-26·4 min read
Overview
Native Windows 11 desktop capture, Circle-to-Search lasso, local OCR, HDR scRGB color picker, and WinUI 3 companion settings architecture.
I used Greenshot for ages on Windows until it started feeling a little too… minimal. I mean, I missed the PowerToys Color Picker I constantly reached for, plus Google Circle to Search on Android, so rolling them into one desktop tool made sense. Fresnel (named during a quick brainstorm) ended up split into a Rust Win32 daemon (fresnel.exe on winit, wgpu, egui, and DXGI) and an on-demand C# WinUI 3 settings app (fresnel-settings.exe). Originally I crammed a slide-out “Screenshot Pool” drawer and an Explorer OLE drag-and-drop shelf straight into the daemon, which promptly taught me that holding 12 4K frames in RAM blows past a 24 MB budget (~796 MB, not great). So I dropped the pool drawer, moved settings out to a separate WinUI 3 process that exits completely when you close it, and let native Windows toast notifications handle recent snips instead.
Workspace Architecture
Fresnel consists of the fresnel binary crate, five workspace library crates, and a WinUI 3 settings app syncing %LOCALAPPDATA%\Fresnel\settings.json over user-scoped NDJSON named pipes (\\.\pipe\fresnel_*):
| Component | Path | Responsibility |
|---|---|---|
| Core Domain | crates/core | Platform-agnostic settings schema, hotkey/mouse bindings, geometry, OKLCH/scRGB color math, redaction, and filename templates. |
| Win32 Platform | crates/platform-win32 | Quarantined unsafe Win32/COM boundary: DXGI Desktop Duplication, WGC, D3D11/D3D12 NT shared handles, named-pipe IPC, and WinRT toasts (plus unshipped Media Foundation and WASAPI recording stubs). |
| GPU Overlay UI | crates/ui | Single cloaked virtual-desktop overlay viewport (OVERLAY_VIEWPORT_ID), BGRA/scRGB quad shader, 15x15 magnifier loupe, lasso trail renderer, and redaction toolbar (plus an unshipped PinnedStencil stub). |
| OCR Engine | crates/ocr | WindowsOcrEngine (Windows.Media.Ocr), PpOcrEngine type alias, OcrResultArbiter, CropPaddingInjector (64x64 px floor), RecursiveXyCut, gutter bullet probing, and StructuredTextFormatter. |
| Visual Search | crates/search | Ephemeral PNG GoogleLensClient handoff, PaletteExtractor, and stubbed CloudVisionClient. |
| WinUI 3 Settings | ui/Fresnel.Settings | Native Fluent UI pages for capture overlay, global hotkeys, OCR, visual search, storage templates, and toast notifications. |
WinUI 3 Companion Settings Gallery






Documentation Sections
DXGI DuplicateOutput1 to wgpu NT shared handles, cloaked virtual-desktop overlay, WinRT OCR + XY-cut layout, and HDR scRGB color math.
NDJSON settings schema, global hotkeys and mouse chords, filename templates, WinRT notifications, and Lens/Cloud Vision.
Continue to Zero-Copy Capture & OCR Pipeline or Companion Settings & Visual Search.