Ugh. Sorry, I don't like when code is written like that. I would rather readability than conciseness. That said, well done, it looks really good (and correct, as well)! Works perfectly under Linux. I am actually working on a similar concept myself, though it's far from ready.
However, I couldn't help but notice that it takes a crapload of samples to converge properly. Have you implemented importance sampling? There is a rather elegant way to do in volume rendering so if you use the probability distribution as demonstrated in "Rendering Participating Media with Bidirectional Path Tracing" which I assume is your reference as well, it lets you let do direct light sampling just as you would in a conventional path tracer (which'll reduce variance considerably, assuming the volume is not too dense and the light source is sufficiently close, obviously). This might help improve performance a bit, if the lights are too small.
I've got some spare processor cycles, just ask me if you need something rendered I'll see what I can do (I can render 512 samples of the default scene in 1m40s, with 4 threads)
Edited by Bacterius, 02 January 2013 - 06:38 AM.
The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.
- Pessimal Algorithms and Simplexity Analysis