Home > Uncategorized > Hardware accelerated fractal rendering using WebGL

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.

Advertisements
Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: