How It Works
Requirements
- macOS or Windows
- Rust (stable toolchain)
Platform-specific:
- macOS
- Xcode Command Line Tools
- Syphon.framework (vendored in project)
- Windows
- Visual Studio Build Tools (C++ workload)
- Spout2 (vendored in project)
- Streaming
- FFmpeg available in
PATH - or set
stream.ffmpeg_pathinassets/output*.json
- FFmpeg available in
Rust Crates
glow— OpenGL bindingswinit/glutin— windowing + GL contextmidir— MIDI inputserde/serde_json— configuration parsing
Native APIs
- OpenGL
- Cocoa / AppKit (macOS)
- CoreMIDI
- Syphon (vendored)
- Spout2 (vendored)
Project Structure
shadecore/
├─ src/
│ └─ main.rs # Core engine loop
├─ native/
│ ├─ spout_bridge/ # C++ Spout2 bridge (Windows)
│ ├─ syphon_bridge.m # Objective-C Syphon bridge (macOS)
│ └─ syphon_bridge.h
├─ vendor/
│ └─ Syphon.framework # Vendored macOS framework
├─ assets/
│ ├─ params.json # Parameters + MIDI schema
│ ├─ output.json # Output routing & hotkeys
│ ├─ output_ndi.json # NDI-specific configuration
│ └─ shaders/
│ ├─ default.frag
│ └─ present.frag
├─ build.rs # Native linking & platform logic
└─ Cargo.toml
Build & Run (Standard Engine)
cargo run
Build & Run (Standard Engine + NDI)
cargo run --features ndi
Pipeline overview
1. OpenGL Rendering
- A window and GL context are created with
winit+glutin - A fullscreen triangle is rendered every frame
- All visuals are produced in the fragment shader
2. Shader Uniforms
Built-in uniforms:
u_time— seconds since startu_resolution— framebuffer resolution
Plus:
- user-defined parameters from JSON
- live-updated MIDI values
3. Render Target
- Rendering occurs into an offscreen framebuffer
- The framebuffer texture is:
- drawn to the preview window
- shared with Syphon, Spout, Stream, or NDI depending on mode