Thanks to some great work (and a fortuitous accident) from the good people at Kineme.net, it’s now possible to use moving images as Displacement Maps in a GLSL Vertex Shader in QC. So I thought I’d give it a go.
The input is the iSight camera, with luminosity modulating the Radius parameter of a function to bend a GLSL grid into a sphere, so what we have is essentially a radial distortion of a sphere, based on the luminosity of the input texture.
This is very cool, and something I’ve been wanting to do for ages. It opens the doors to all sorts of mesh-related fun, as you can potentially use custom CIFilter or GLSL Fragment shader code to create different displacement images to feed into the patch.
The only problem is, it runs quite slowly on my machine. It’s undoubtedly much faster to do this kind of thing with Vertex Buffer objects, but that means custom OpenGL code in a QC plugin, which is way beyond my capabilities currently. Sadly.