First Steps with OpenCL
I managed to get PyOpenCL to work as a projection engine for some AMR data. This image is of a simple PyOpenCL driver I wrote using Enthought's Traits as a GUI. The idea is that you can change some parameters, change the routine it calls, hit recompile, and it'll pass all the bricks back in. I'd like to extend this concept, but first I've got to ensure that my OpenCL kernels are doing the right thing!
The kernel shown above (and visible as the subroutine "proj" in my OpenCL repo) does a simple projection. The image might even be a MIP. I've since been able to make it ray cast, but with a bunch of artifacts I haven't been able to track down, including one that has stymied plotting all three channels simultaneously. Here's an image of the red channel from the ray caster, plotted against a different colormap:
So it's sort of working, but the artifacts will need some work before they're all sorted out. Ultimately, I'd really like to support OpenCL as a rendering engine, as well as the current software engine we have now. I think having the TVTK frontend that dumps to a software or OpenCL backend for ray-casting the full volume would be ideal. I also think there's really something to the idea of having a generic engine (the simplest form of which I included a screencap above) that just passes data through a shader and plots the results. I'm not the person to write one, I don't think, but I've heard rumblings one might be coming out of a pretty fancy coder up in the bay.



