A bit of fun: Bouncing Mandelbrot WebGL cubes

Lighting is tricky, and it’ll take me a little while to get the next lesson up. So, in the meantime, here’s something completely pointless but fun: some bouncing Mandelbrot WebGL cubes, based on my earlier Mandelbrot fragment shader example.

Here’s a video showing what it looks like when run on a browser that supports WebGL:

Click here and you’ll see the live WebGL version, if you’ve got a browser that supports it; here’s how to get one if you don’t. One thing to note is that if you’re using software rendering it’s probably not going to look very good :-S

BTW the code is a truly ghastly agglomeration of hacks, please don’t base anything on it…

You can leave a response, or trackback from your own site.

5 Responses to “A bit of fun: Bouncing Mandelbrot WebGL cubes”

  1. steve says:

    Crashed Safari nightly after drawing about 10 frames.

  2. giles says:

    Thanks — I’ve repro’d on a MacBook Air. I’ll see if I can isolate that. Looks like it’s a Safari problem rather than a general Mac one, because it works fine on Minefield on the same machine.

  3. [...] A bit of fun: Bouncing Mandelbrot WebGL cubes [...]

  4. giles says:

    Hmm, one possible cause was that I was leaking memory like a sieve — I wasn’t deleting buffers once I was done with them. I’ve patched that up and it looks smoother in Firefox now, but unfortunately my other half has taken her Mac on a business trip so I can’t test it. If anyone reading this has WebKit/Safari and can check out whether it works now (make sure you’ve saved everything first) then I’d be grateful if you could leave a comment!

  5. Justus Rambaldi says:

    The boxes appear in Black color, my impression is the lights is not operational in Firefox Browser, or some problem rendering the texture or in shader.

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter