WebGL Caustics

I’ve been working on a WebGL graphic demo about realtime caustics. You can see the results here:


Just a little standard disclaimer:
This software is provided ‘as-is’, without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

The realtime criteria may only hold for low quality settings, but it’s still very fast. Also the caustics are not 100% physically accurate. However, with some extreme settings, you can get suprisingly good results. Here are some comparisons to LuxRender:


You can increase the accuracy by increasing the Sample Falloff and Sample Area, but it also slightly increases the noise. More influence on the noise and the performance has the number of Caustic Samples.

Compatibility has only been confirmed for Firefox so far. If you use a different browser, I would be happy to get some feedback.

That all being said: Have fun trying it out!

Nice work, and just because it fits:

Cool stuff.
I was able to get this:

I should have known people would like to test the extremes.:rolleyes:

The truth is there aren’t enough precalculated random values (or even enough precision) to actually make a difference at such a high sample count. I have just fixed that, but I don’t know the period of the default random generator in javascript. So it might still make not a big difference.