You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

6h 55m 22s logged

added support for trajectory based fractals

most people know the normal fractals (the ones ive covered so far), such as the mandelbrot and julia sets, that test wether or not a point escapes and maps how long it takes to escape

trajectory fractals look really cool, and the difference is that they map the trajectory that 𝑧 takes on its way out, while incrementing a counter for every pixel it steps on.


getting this to work was a lot of work, and required to write a whole new shader file from scratch, except instead of a .frag/.vert combo, it was a compute shader (.glsl).

instead of simply running a loop and writing color data to each independent pixel like with the escape-time fractals do,

the trajectory shader has to pick a random (x, y) starting coord, and then track its orbit across the complex plane, writing data to random pixels as it goes.

this required me to use atomics, because if 2 orbits cross, instead of one overwriting each other, you have to use imageAtomicAdd() to make sure that the brightness stacks up.


one other issue was that at first it was super grainy, which was fixed by assigning each gpu thread 50 random sampled to increase detail substantially.


i also nearly exploded my gpu because i accidentally had the render system run 50+ compute sequences at the same time, so i now have each compute wait for the one before it to finish


in other happenings, there is now a preset feature that writes your current color setup set, zoom, center, etc. to a JSON file to be loaded later

also added the newton set, but its a less interesting escape-time fractal, so not covered in as much detail

image: buddhabrot set, rendered at 4k

0
5

Comments 0

No comments yet. Be the first!