A comprehensive, modular fractal generator built with Rust and Bevy. Features advanced GPU-accelerated fractal rendering, real-time audio/MIDI control, and a visual node-based composition interface.
- โ GUI Framework: Migrated from eframe to Bevy 0.17 + bevy_egui
- โ Rendering Engine: Integrated WGPU renderer with Bevy's render pipeline
- โ Performance: Optimized GPU resource management and rendering pipeline
- โ Compatibility: Resolved dependency conflicts and compilation issues
- GPU Acceleration: WebGPU/Vulkan/Metal/DX12 rendering with real-time performance
- Node-Based Editor: Visual composition interface with drag-and-drop functionality
- Shader Generation: Advanced fractal algorithms with distance estimation
- 3D Scene Environment: Full 3D environment with fractal objects
- Animation System: Keyframe animation for camera, lighting, and parameters
- Export System: 3D mesh export (OBJ, STL) and image formats
- Professional UI: Modern dark theme with glassmorphism design
- Cross-Platform: Windows, macOS, Linux support
- Web Deployment: WASM/WebGPU support for browser-based editing
- Advanced Features: Global illumination, volumetric effects, VR/AR support
- Animation Enhancements: Timeline editor, audio reactivity, MIDI control
- Export Improvements: Animation sequences, voxel formats, NFT integration
- Node Editor: Advanced node composition and preset management
- Performance: Memory optimization for complex scenes
- Feature Completeness: Some advanced animation features pending
- Animation System: Complete timeline editor and keyframe animation
- Audio Integration: Real-time audio analysis and MIDI control
- Advanced Rendering: Global illumination and volumetric effects
- Export Features: Animation sequences and additional formats
- 2D Fractals: Mandelbrot, Julia, Burning Ship, Tricorn, Phoenix
- 3D Fractals: Mandelbulb, Mandelbox, Menger Sponge, Quaternion Julia
- Hybrid Fractals: BulbBox, Amazing Box, Kaleidoscopic IFS
- Procedural: Generic spirals, torus, helix, vortex patterns
- Distance Estimation: GPU-accelerated real-time rendering
- Real-time Parameters: Zoom, iterations, power, bailout, rotation
- Color Control: Customizable palettes and gradient mapping
- Transform Controls: Position, scale, rotation, folding parameters
- Fractal-specific: Mandelbulb power, Mandelbox folding, IFS transforms
- Visual Node Editor: Drag-and-drop fractal composition
- Generator Nodes: 2D/3D fractals, noise, mathematical functions
- Transform Nodes: Position, scale, rotate, warp operations
- Effect Nodes: Color correction, geometry transforms, filters
- Animation Nodes: Timeline control, LFO oscillators, noise generators
- GPU Acceleration: WebGPU/Vulkan/Metal/DX12 support
- Real-time Rendering: 60+ FPS on modern GPUs
- Cross-Platform: Windows, macOS, Linux, Web (WASM)
- Memory Efficient: Optimized resource management
- Keyframe Animation: Professional timeline with interpolation
- Procedural Animation: L-systems, noise, attractors
- Camera Animation: Cinematic camera movement
- Parameter Automation: Dynamic fractal parameter changes
- Ray Marching: Real-time distance field rendering
- Adaptive Quality: Automatic LOD based on performance
- Professional Viewport: 3D navigation and camera controls
- Material System: PBR materials with metallic/roughness workflow
- Multi-Display: Support for complex display setups
- Viewport Controls: Professional camera and navigation tools
- Interactive Controls: Real-time parameter adjustment
- Export Preview: WYSIWYG export preparation
- Dark Theme: Modern dark interface with glassmorphism
- Customizable Workspaces: Multiple layout configurations
- Context Menus: Right-click context-sensitive actions
- Keyboard Shortcuts: Efficient workflow optimization
- Rust 1.70+
- Vulkan/Metal/DX12 compatible GPU
- Audio device (optional, for audio features)
- MIDI device (optional, for MIDI control)
git clone https://github.com/compiling-org/modular-fractal-shader
cd modular-fractal-shader
cargo build --release# Start GUI application
cargo run
# Run performance benchmarks
cargo run -- benchmark
# Run compatibility tests
cargo run -- test
# Build for web deployment
cargo run --features webcargo run --example node_editor_democargo run --example fractal_demoimport init, { WebFractalStudio } from './pkg/modular_fractal_shader.js';
async function run() {
await init();
const studio = WebFractalStudio.new('canvas');
// Start rendering loop
function render() {
studio.render_frame(performance.now());
requestAnimationFrame(render);
}
render();
}FractalEngine- Main fractal computation engineFractalRenderer- GPU-accelerated rendering systemNodeEditor- Visual node composition systemAnimationSystem- Timeline and keyframe animationSceneSystem- 3D scene managementExportSystem- Mesh and image exportUISystem- Bevy + bevy_egui interface
- Fractal Computation - Distance estimation on GPU
- Ray Marching - Real-time rendering of distance fields
- Lighting - Physically-based lighting calculations
- Post-Processing - Color grading and effects
- Viewport Display - Interactive 3D viewport
- Fractals: Mandelbrot, Julia, Burning Ship, Mandelbulb, Mandelbox, IFS
- Noise: Perlin, Simplex, Voronoi, Flow noise
- Mathematical: L-Systems, Cellular Automata, Strange Attractors
- Geometric: Spheres, Boxes, Torus, Custom shapes
- Spatial: Translate, Rotate, Scale
- Deformations: Warp, Twist, Bend, Taper
- Combinations: Union, Intersect, Subtract, Smooth operations
- Replication: Array, Mirror, Circular patterns
- Color: Brightness, Contrast, Saturation, Hue, Curves
- Geometry: Displace, Noise, Fractal perturbation
- Filter: Blur, Sharpen, Edge Detect, Posterize
- Distortion: Wave, Ripple, Fisheye, Swirl
- Timeline: Keyframe animation with interpolation
- Procedural: LFO, Noise, Attractors
- Logic: If/Then/Else, Switches, Math operations
- Control: Parameter drivers and expressions
- Materials: PBR properties, textures, normal maps
- Lighting: Point, directional, spot lights
- Camera: Position, rotation, field of view
- Post-Processing: Bloom, DOF, color grading
# 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 fractal_demosrc/
โโโ main.rs # Application entry point
โโโ lib.rs # Library interface
โโโ gui.rs # Bevy GUI implementation
โโโ fractal/ # Fractal engine
โ โโโ mod.rs
โ โโโ engine.rs
โ โโโ formulas.rs
โ โโโ renderer.rs
โ โโโ types.rs
โโโ ui/ # User interface
โ โโโ mod.rs
โ โโโ main.rs
โ โโโ node_editor.rs
โ โโโ theme.rs
โ โโโ fractal_ui.rs
โโโ scene/ # 3D scene management
โ โโโ mod.rs
โโโ animation/ # Animation system
โ โโโ mod.rs
โ โโโ timeline.rs
โ โโโ keyframe.rs
โโโ export/ # Export functionality
โ โโโ mod.rs
โโโ benchmark.rs # Performance benchmarking
โโโ project.rs # Project management
โโโ nodes.rs # Node definitions
docs/ # Documentation
examples/ # Example applications
assets/ # Shaders and resources
- Fractal engine with distance estimation
- GPU-accelerated rendering with WGPU
- Node-based visual composition
- Professional UI with Bevy + bevy_egui
- 3D scene management
- Basic animation system
- Mesh and image export
- Cross-platform support
- Web deployment (WASM/WebGPU)
- Migration from eframe to Bevy
- Advanced animation timeline
- Audio/MIDI integration
- Global illumination
- Volumetric effects
- Plugin system for custom nodes
- Networked multi-user collaboration
- VR/AR fractal environments
- AI-assisted fractal generation
Contributions are welcome! Please feel free to submit a Pull Request.
- Follow Rust coding standards
- Add tests for new features
- Update documentation
- Ensure cross-platform compatibility
This project is licensed under the MIT License - see the LICENSE file for details.
- Bevy Engine - For the amazing Rust game engine
- WebGPU/WGSL - For modern GPU compute capabilities
- Rust Community - For the excellent ecosystem
- Fractal Community - For the inspiration and algorithms
- Repository: GitHub
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with โค๏ธ and lots of fractals