Hit testing of vertex-shader-modified meshes

Last night I implemented a Cg shader that bends meshes, and I see that hit-testing is happening vs the un-distorted mesh.

Is there something I can add to my shader to have it participate appropriately in picking? I built this to get better performance than having multiple instances of a parametric mesh.

Picking, as in, using the collision detection system? The collision detection takes place on the CPU, it has no knowledge of the shaders applied to the model.

You can however create a picking system on the GPU. To do this, you render your mesh to a buffer using a shader that outputs whatever data you want (eg., a mesh ID, or a position), and attach a texture that is transferred back to RAM. Then you sample the appropriate pixel in the rendered texture to read out the data under the mouse cursor.