ShadDem is a real-time GLSL shader visualizer for Windows, built with .NET 8 and Silk.NET (OpenGL + windowing) with an ImGui.NET-based control panel. It renders a library of fragment shaders with a full post-processing effect stack, audio-reactive modulation, a timeline/automation system, 3D model overlay, particle system, live shader coding, and MP4/GIF video export via ffmpeg.
This project is a from-scratch C# port of an original Python/Pygame/ModernGL shader demo, rebuilt end-to-end on the .NET/Silk.NET stack.
Status:
v1.0.0. Seeroadmap.mdfor the detailed, living feature checklist and porting decisions, androadmap-ux.mdfor the interface/performance/workflow roadmap.
The docked workspace: a persistent left Navigation rail (Home / Shaders / Layers / Effects / Audio / Timeline / 3D / Export / Settings), a large central Preview, and a contextual right Inspector that only shows controls for whatever's selected. Three built-in layout presets (Simple / Standard / Power User) are switchable at any time from the rail.
- Shader engine — loads any number of
.glslfragment shaders from a folder, hot-reloads them on file change, and reports compile errors live in the UI. - Layer stack — stack multiple shaders with per-layer blend modes (Add, Multiply, Screen, Overlay, Difference, Exclusion, ...) and opacity.
- Post-processing pipeline — color grading (brightness/contrast/saturation/hue/posterize/sepia/solarize), geometric distortion (fisheye, wave, mirror, vortex, swirl, pixelate, mosaic), glitch/retro effects (RGB split, chromatic aberration, VHS, scanlines, datamosh), bloom, motion blur, feedback accumulation, and shader-to-shader transitions (wipe/fade/zoom/pixelize).
- Audio reactivity — real-time FFT analysis (spectrum + waveform) drives shake, strobe, RGB split, scale, and kick-triggered effects; on-screen spectrum/waveform overlay with trail decay.
- Timeline & automation — schedule shader switches, effect changes, and text overlays over time.
- 3D model overlay — loads Wavefront
.objmodels, with wireframe/solid rendering, transform and lighting controls, composited on top of the shader background. - Particle system — CPU-simulated particle field with kick-driven radial push.
- Live coding — edit and hot-compile a shader's
mainImagedirectly from the in-app editor, with an insertable snippet library (palette, 2D rotation, 2D noise, raymarching loop). - Presets — save, load, and randomly generate full effect-parameter presets (retro/art/geo/trippy/dark themes).
- Video export — record the composited output to MP4 (H.264, with optional NVENC/QSV hardware acceleration) or GIF, with audio muxing and a live progress bar, via
ffmpeg. - Screenshots — one-key PNG capture of the current frame.
- Secondary output window — mirror the composited output to a second, borderless window (e.g. for projection/streaming), sharing the primary GL context.
- Docked workspace — a persistent Navigation rail, a large central Preview, and a contextual Inspector, with 3 switchable layout presets (Simple / Standard / Power User).
- Templates, first-run onboarding, and a Demo Wizard — 12 curated shader+effect templates, a "Randomize Demo" one-click button, a first-launch welcome screen and guided tour, a linear step-by-step Demo Wizard, drag-and-drop file loading (audio/image/shader/model), and one-click Quick Export with sensible defaults.
- Windows (the app targets
win-x64and is published as a self-contained single-file executable) - .NET 8 SDK
- ffmpeg available on
PATH— only required for video/GIF export; the app runs fine without it otherwise
Clone the repository and restore/build the solution:
git clone https://github.com/<your-username>/ShaderDemo.git
cd ShaderDemo
dotnet restore ShaderDemo.sln
dotnet build ShaderDemo.slnRun it directly from source:
dotnet run --project src/ShaderDemo.AppOr produce a self-contained, single-file win-x64 build with the provided build script:
./build.ps1The published executable is written to publish/ShaderDemo.exe, alongside the shaders/ folder that ships with it.
- Left / Right arrow — switch to the previous/next loaded shader
- Tab — hide/show the GUI (shows the shader fullscreen when hidden); F11 fullscreen; F1 performance HUD; F12 screenshot; E start/stop recording; Ctrl+K command palette
- The docked workspace (open by default) is a Navigation rail (jump to any section, switch Simple/Advanced mode, switch layout preset), a central Preview, and a contextual Inspector — see the screenshot above. First launch shows a welcome screen (start from a template / blank / import a project) and an optional guided tour
- Drag and drop an audio file, image,
.glsl/.hlslshader, or.objmodel directly onto the window to load it - Command-line flags: the app is normally launched with no arguments. A set of
--test-*/--benchmarkflags exist for internal QA (headless-style smoke tests, single-shader compile checks, GUI panel exercises, performance benchmarking, etc.) and exit immediately after running — see the top ofsrc/ShaderDemo.App/Program.csfor the full, current list
Settings, layer stacks, timeline data, and presets are persisted next to the executable as settings.json, layers.json, timeline.json, and presets.json.
ShaderDemo.sln
src/
ShaderDemo.App/ Entry point, window bootstrap, wiring
ShaderDemo.Core/ Rendering engine, GUI panels, audio, timeline, export, settings
shaders/ Bundled GLSL fragment shaders (Shadertoy-style mainImage)
assets/ Application icon
roadmap.md Detailed feature/porting roadmap and decisions log
build.ps1 Self-contained win-x64 publish script
- .NET 8 / C# 12
- Silk.NET — windowing, input, and OpenGL bindings
- ImGui.NET — immediate-mode GUI
- NAudio — audio decoding and FFT analysis
- StbImageSharp / StbImageWriteSharp — texture and screenshot I/O
- Microsoft.Data.Sqlite — local data persistence
ffmpeg(external process) — video/GIF encoding
Contributions, bug reports, and shader submissions are welcome. Please read CONTRIBUTING.md before opening a pull request.
See CHANGELOG.md for release notes.
Distributed under the MIT License. See LICENSE for the full text.
Copyright (c) 2026 Patrick JAILLET


