Desaxismundi was kind enough to let me see the code to his HLSL velvet surface shader. After a bit of fiddling around this morning, I was able to get it working in QC. Here is the result, applied to some imported 3D meshes, created with the Paul Bourke’s excellent supershape explorer application.
I’ve modified the code slightly, so it runs as two discrete functions, one in the Vertex Shader, and one in the Fragment Shader. You just have to call these functions from the main loop in the two shader programs. The VS function takes the normal as input and outputs the correct varyings to send to the FS, and the function in the Fragment Shader takes as input the various lighting parameters, and a texture input and returns the final lit colour of the fragment.
This should make it nice and easy to integrate into other shader code.