Archive

Archive for July, 2014

Hardware accelerated fractal rendering using WebGL

Rendering of fractals like Mandelbrot is extremely suitable for parallelization. Each and every pixel can be calculated independently. Today’s graphics hardware is very good at such calculations and WebGL provides programmability access to all this goodness from Javascript and browsers (not all though but chrome works really well).

I ported my Mandelbrot renderer to WebGL and HLSL and all of a sudden, the rendering is instant. Nice!

Here is the actual pixel shader (yes, I know it is pure evil to publish source code as images but I was just too lazy…)

image

The entire code at bitbucket (in the test2 folder).

Again, I am not claiming this to be new or unique but it was fun. I started out with the shader from this article. Mine is only slightly modified.

Happy coding.

Categories: Uncategorized