Here it is. I'm not sure it's exactly what you're looking for, but this setup maps the blue channel to the axis pointing directly out of the screen, and red and green are screen right and screen up respectively, as long as you manually enter the camera rotations into the appropriate nodes.
Please make sure to read 'Note 01' carefully. You need to copy the camera rotation values in a very specific way.
The render node has gamma set to 1 and other tone-mapping operators turned off. This is in case you want to use the 8-bit output directly, where I think you need raw values.
Matt