An open API service indexing awesome lists of open source software.

https://github.com/joshbrew/webgpu_fractals

Fractals in WebGPU compute shaders, with a twist! Make infinite never-seen variations of famous fractals and more.
https://github.com/joshbrew/webgpu_fractals

Last synced: 15 days ago
JSON representation

Fractals in WebGPU compute shaders, with a twist! Make infinite never-seen variations of famous fractals and more.

Awesome Lists containing this project

README

          

## WebGPU Fractals


Screenshot 2025-11-20 224655-min

### ----> [Make your own fractals!](https://webgpufractals.netlify.app/) <----

#### [Codepen alt url](https://codepen.io/joshbrew/pen/ByNxqKB)

#### See also: [3D point cloud fractals](https://github.com/joshbrew/3D_Fractals_Scale_Space) (earlier non-WebGPU version)

This is a comprehensive WebGPU fractal rendering system built on compute shaders. It features a lot of well known fractals plus a bunch of custom ones that mostly build off of newton's fractals. It is written in pure javascript and WGSL with zero dependencies.

There are 71 fractal formulas to mess around with plus dozens of modifiers that alter the coordinates per-iteration in combinable ways. There are infinite possibilites, you might be surprised what you find.

You can:
- Control pan, zoom, iteration count, resolution (up to 8K!), escape radius, convergence...
- Modify the per-iteration math with a variety of cumulative effects.
- Add displacement mapping and lighting with flexible mesh resolution.
- Control which parts of the fractal are visible.
- Change color and hue in a very wide range, plus a simple optional lighting and specular model.
- Edit in real time with instantaneous updates to fine tune your favorite images.
- Click on the canvas to get camera control with WASD support. Press esc to quit.
- Download the image at full resolution (use reset camera if you moved so you can get the full image!). 8K images can be up to 50MB raw
- Play music (requires isolated context to use the audio worklet system correctly, see tinybuild.config.js for headers used)
- Animate the fractals to the music

Some limits:
- No deep zoom as we rely on base 32 bit float precision. We make up for it with the modifiers. It bottoms out around 7 decimals of precision.
- Julia sets don't work well with the modifiers so they're excluded, but you can still mess with the classic one.


## Build and run

With `tinybuild` installed globally (`npm i -g tinybuild`): `npm start`

## Configuration

See [`./tinybuild.config.js`](./tinybuild.config.js) for settings.

Add build:true for build-only, add serve:true for serve-only, or set bundle or server to false alternatively.

Click to go to youtube:
[![VideoM](https://img.youtube.com/vi/G-FtKNiawx0/maxresdefault.jpg)](https://www.youtube.com/watch?v=G-FtKNiawx0)
[![Video1](https://img.youtube.com/vi/3Sco25ak8AA/maxresdefault.jpg)](https://www.youtube.com/watch?v=3Sco25ak8AA)
Click to go to youtube:
[![Video4](https://img.youtube.com/vi/3WHPgqEGz9A/maxresdefault.jpg)](https://www.youtube.com/watch?v=3WHPgqEGz9A)
#### More screenshots:

image

fractal-2560-kmrb67
fractal-2048-6w645p-min
Screenshot 2026-02-14 110935
Screenshot 2026-02-14 110908
Screenshot 2026-02-14 110328
Screenshot 2026-02-14 105859
Screenshot 2026-02-14 105519

fractal-1536-jltvae-min
fractal-3968-jjxvep-min
fractal-3968-vv22hy-min
fractal-4096-pl3iog-min
fractal-4096-4mfwjr-min
fractal-4096-1xos3i-min
19image
18image
17image
13image
11image
9image
7image
6image
3image
2image
14image

Screenshot 2026-02-13 193303
Screenshot 2026-02-13 193419

Screenshot 2026-02-13 194008
Screenshot 2026-02-13 193818

fractal-4096-jbfcl2 (1)
fractal-4096-riq22k (1)
fractal-4096-x7i151 (1)
fractal-4096-xw1yly (1)
fractal-4096-oeqnyj (1)
fractal-4096-xuht3o (1)
fractal-4096-tp1sgf (1)
fractal-canvas-3eool6 (1)

Click to go to youtube:
[![Video2](https://img.youtube.com/vi/uiNGqn5zEUs/maxresdefault.jpg)](https://www.youtube.com/watch?v=uiNGqn5zEUs)
Click to go to youtube:
[![Video3](https://img.youtube.com/vi/89uVpb0QUw8/maxresdefault.jpg)](https://www.youtube.com/watch?v=89uVpb0QUw8)