Camera space ramp

Is there a way to setup a ramp using camera position information? this would basically be similar to the way 3D gradients work from the native C4D gradient shader when setup in camera space. This is also effectively depth pass, but I would like the depth information to drive additional parameters in an Arnold shader network.