Change color of an object depending on camera view (cycles render)
It is possible to do that in Cycles using a Camera Data Node

You must use the output of the View Vector socket, separate it into its components with a Separate XYZ node, then pass its Z component through a Color Ramp node to control what colors you get.

The effect might be hard to see at start because the red color would always be off-camera, but tweaking the color ramp node may emphasize the effect.



Should be automatically kept in sync with the camera position