This will be more an information post than anything else… but its something i have been watching very closely.
Ever since CUDA was being pushed as the best thing since sliced bread, a few people on the Lux forums were saying
`What about using graphics cards to do really fast ray tracing?’
Faced with a few technical challenges and not wanting to develop code completely using CUDA (what about the ATI people?) the Lux team summed it up as, it will be difficult to implement what we have due to memory and technical constraints, and we would want code to work across all platforms.
And that was seemingly that!
But about a year or two down the line, the Khronos group had developed and released OpenCL, which allows for cross platform GPGPU programming. When I heard of this originally the first thing that came to mind was… can Lux get a speed boost?
While this post is likely very late (iv not had a blog that long), a certain Mr Dade from the Lux forums took it upon himself to check out OpenCL and what it could do. He is also the same person who wrote the 3Dfx driver for quake (I believe, sorry if wrong, still he is a legend 😀 ). What started out with a OpenCL mandelbrot demo, evolved into a GPU version of smallpt a 99 line ray tracing program. These early demos were able to show the power of the GPUs over that of the CPU for floating point processing.
Dades full range of OpenCL toys can be found here
Since then, he has been working extensively on LuxRays, a library that will allow the use of OpenCL to accelerate ray tracing. It is planned to impliment it fully when LuxRender 0.8 comes about. Right now, it has an extremely well developed path tracing engine known as SmallLuxGPU or SLG, which has been upgraded and developed to produce some rather amazing results.
All the source code for this can be found at http://src.luxrender.net/, more information regarding the plan to use OpenCL with Lux and SLG can be found at
The work done by Dade and also more recently a few of the other developers has been simply amazing. Starting out with SmallLuxGPU being only able to render matte materials, to being able to work with other materials, have exporters written for it, texture mapping and hdri environment mapping.
Unfortunately OpenCL, is still very much in its infancy and is plagued by bad drivers and support by the main two GPU manufacturers. I have a GTX295, a fairly fast card for GPGPU processing. It performs badly due to spin locking, where for most of the time the GPU/CPU does nothing and waits for clock cycles to complete so it can synchronise. I don’t understand the effect very well, though from what i read it almost halves or cripples performance 😦
Despite that, performance is still really fast 🙂