I stumbled upon this method as a way to get around Maya 1.0's lack of depth of field. I saw a tutorial on Tom Kluyskens' Maya Queen page on how to fake environmental fog. His tutorial shows how to make a shader-based fog that renders fairly fast. It was based on the sampler node's ability to give you info about a whole range of things. Tom Kluyskens used it to determine the distance of an object from the camera. When I started messing around with his tutorial I immediately realized that I could use the sampler node info much like a Z buffer but with much more controllable results.