Hmm this looks exciting, cannot believe I made this in 12 hours, still lots to do of course. This is still in the bigger ecosystem of https://github.com/compiling-org we are building at vjun.io
https://github.com/compiling-org/rust-fractal-shader-engine
A comprehensive, modular fractal shader system built with Rust and Bevy. Features advanced GPU-accelerated fractal rendering, ISF shader support, real-time audio/MIDI control, and a visual node-based composition interface.
Rust Bevy License
✨ Features
🎨 Shader Generation & Conversion
ISF Shaders - Examples and original collection
Multi-format Support - ISF ↔ GLSL ↔ WGSL ↔ HLSL conversion
Real-time Conversion - Automatic shader format translation
Custom Shader Support - Load and convert user-created shaders
🎛️ Interactive Control System
16 Controllable Parameters - Time, mouse, zoom, iterations, colors, audio, MIDI
Audio-Reactive - Real-time spectrum analysis and beat detection
MIDI Control - Full MIDI CC mapping and note triggers
Live Parameter Mapping - Dynamic parameter assignment
🎯 Node-Based Composition
Visual Node Editor - Drag-and-drop shader composition
Generator Nodes - 2D/3D fractals, noise, mathematical functions
FX Nodes - Color correction, geometry transforms, filters
Audio/MIDI Nodes - Spectrum analysis, beat detection, MIDI mapping
Buffer Nodes - Multi-pass rendering, feedback loops
🚀 Performance & Compatibility
GPU Acceleration - WebGPU/Vulkan/Metal/DX12 support
Real-time Rendering - 60+ FPS on modern GPUs
Cross-Platform - Windows, macOS, Linux, Web (future)
Memory Efficient - Optimized for large shader collections
📦 Installation
From Crates.io
cargo add rust-fractal-shader-engine
From Source
git clone https://github.com/compiling-org/rust-fractal-shader-engine
cd rust-fractal-shader-engine
cargo build --release
🎮 Usage
Basic Usage
`use rust_fractal_shader_engine::RustFractalShaderEngine;
let mut engine = RustFractalShaderEngine::new();
// Load ISF shaders from directory
let loaded = engine.load_isf_shaders_from_directory("assets/shaders/isf").unwrap();
println!("Loaded {} ISF shaders", loaded.len());
// Convert ISF to WGSL
let wgsl_code = engine.convert_isf_to_wgsl(isf_source).unwrap();`
Node Editor Demo
cargo run --example node_editor_demo
ISF Shader Loader
cargo run --example load_isf_shaders
🏗️ Architecture
Core Components
RustFractalShaderEngine - Main engine with shader management
ShaderConverter - Multi-format shader conversion
NodeEditorPlugin - Visual node composition system
AudioMidiSystem - Real-time audio and MIDI processing
FractalUniforms - GPU parameter buffer structure
Shader Pipeline
Load - Import ISF/GLSL shaders from files
Parse - Extract metadata and parameters
Convert - Transform to target format (WGSL/HLSL)
Compose - Combine via node-based interface
Render - GPU-accelerated real-time display
🎨 Node Types
Generators
Fractals: Mandelbrot, Julia, Burning Ship, Mandelbulb
Noise: Perlin, Simplex, Voronoi, Flow noise
Mathematical: L-Systems, Cellular Automata, Strange Attractors
Imported: ISF shaders, Shadertoy conversions
Effects
Color: Brightness, Contrast, Saturation, Hue, Curves
Geometry: Rotate, Scale, Warp, Kaleidoscope
Filter: Blur, Sharpen, Edge Detect, Posterize
Distortion: Wave, Ripple, Fisheye, Swirl
Audio/MIDI
Analysis: Spectrum, Beat Detection, Frequency Bands
Control: MIDI CC Mapping, Note Triggers, Velocity
🔧 Development
Prerequisites
Rust 1.70+
Vulkan/Metal/DX12 compatible GPU
Audio device (optional, for audio features)
MIDI device (optional, for MIDI control)
Building
# Debug build
cargo build
Release build (optimized)
cargo build --release
Run tests
cargo test
Run examples
cargo run --example node_editor_demo
cargo run --example load_isf_shaders
Project Structure
src/
├── lib.rs # Main library interface
├── shader_converter.rs # Shader format conversion
├── shader_renderer.rs # GPU rendering system
├── node_editor.rs # Visual node editor
├── nodes.rs # Node definitions and logic
├── audio.rs # Audio/MIDI processing
├── ui.rs # User interface components
└── main.rs # Application entry point
examples/
├── node_editor_demo.rs # Visual node editor demo
├── fractal_demo.rs # Basic fractal rendering
└── load_isf_shaders.rs # ISF shader loading demo
assets/shaders/isf/ # ISF shader collection (369 shaders)
🎯 Roadmap
✅ Completed
ISF shader loading and parsing
Shader format conversion (ISF ↔ WGSL/HLSL)
GPU uniform parameter system
Node-based visual composition
Audio analysis and MIDI control
Real-time fractal rendering
🚧 In Progress
Web deployment (WASM/WebGPU)
NFT minting (Filecoin + NEAR)
Video/audio recording
Advanced fractal editor
🔮 Future
Plugin system for custom nodes
Networked multi-user collaboration
VR/AR fractal environments
Machine learning shader generation
Discussion (0)