a nother simple way to do this would be to use a ramp with a sampler info node set to faceing raito. or if you have maya 5 use the ramp shader.