Introducing Fractal: A WebGPU-Powered Fractal Flame Renderer

Introducing Fractal: A WebGPU-Powered Fractal Flame Renderer

2 min read

I'm excited to share Fractal, an open-source fractal flame rendering engine that brings the beautiful complexity of fractal flames to the modern web using WebGPU.

Check out the source code and try the live demo . If you're interested in fractal flames, WebGPU, or just want to see what's possible with modern compute shaders, I'd love to hear your feedback.

The Intersection of Art and Compute

Fractal flame rendering

Fractal flames are a fascinating example of where art meets mathematics and computational power. These algorithmic visualizations create stunning, organic patterns through iterative function systems and carefully tuned transformations.

Historically, rendering fractal flames was a CPU-bound process that took considerable time. Tools like Apophysis dominated the space but were slow, making high-resolution output or video practically impossible. Fractron9000 brought GPU acceleration but eventually became difficult to maintain and run on modern systems.

A Modern Approach

Fractal represents a fresh take on fractal flame rendering, leveraging modern web technologies:

  • WebGPU compute shaders for high-performance rendering directly in the browser
  • Node.js CLI for validation and batch processing
  • Monorepo architecture with shared core engine (@fractal/core), web interface (@fractal/web), and CLI tools (@fractal/cli)
  • 30 mathematical variations implementing affine transformations
  • Video generation with keyframe support and auto-tweening

Built with AI Pair Programming

This project served as an interesting test case for the limits of AI-assisted development. Porting OpenCL compute shaders to WebGPU is non-trivial work, requiring a combination of GPT-4.5 and Claude Opus to get the initial version across the line.

Once the framework was in place, adding new features became significantly easier - demonstrating how AI pair programming can help tackle complex initial implementations while still requiring human expertise for architectural decisions.