lietzsche;fresnel

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_*):

ComponentPathResponsibility
Core Domaincrates/corePlatform-agnostic settings schema, hotkey/mouse bindings, geometry, OKLCH/scRGB color math, redaction, and filename templates.
Win32 Platformcrates/platform-win32Quarantined 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 UIcrates/uiSingle 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 Enginecrates/ocrWindowsOcrEngine (Windows.Media.Ocr), PpOcrEngine type alias, OcrResultArbiter, CropPaddingInjector (64x64 px floor), RecursiveXyCut, gutter bullet probing, and StructuredTextFormatter.
Visual Searchcrates/searchEphemeral PNG GoogleLensClient handoff, PaletteExtractor, and stubbed CloudVisionClient.
WinUI 3 Settingsui/Fresnel.SettingsNative Fluent UI pages for capture overlay, global hotkeys, OCR, visual search, storage templates, and toast notifications.

Documentation Sections

Continue to Zero-Copy Capture & OCR Pipeline or Companion Settings & Visual Search.

Search wiki and portfolio

type to search across all entries.