Something like a "irradiance" imput node?

I’ve been wondering. Is there something that works like an “irradiance” node? Something that returns 0 if an object is not lit, and 1 or .9 or 30 or something if it’s highly lit. So that for example I can use it to control areas such that they’re one color if they’re in the shade or another if they’re being lit. The closest thing I can think of is giving the object a diffuse white material, bake it, then use that as a mask, but for a number of reasons that won’t work in my case.

Edit: Sorry for not mentioning this. I mean in cycles. I already know there are several ways to do it in Blender Internal, and I happened to learn another after reading this post, but still would like to know a method to do this in cycles.

You can use the direct and indirect light render passes to change the colors etc in compositor. At shader level this is not possible I believe.

I see. Thank you for your answer.

Fortunately, I’ve been rediscovering Blender Internal lately, meaning I’ve learned how to do the things I thought I couldn’t do in BI, so at least for now I can work outside Cycles.

For what it’s worth, I use BI nearly all the time, using Cycles to contribute passes where I really need “soft, even lighting.” (Cycles is a fine “soft-box.”)

In Blender today, we have several very-different “built-in renderers”: Cycles, BI, and OpenGL. All are different. All can be used together. (And we can also export data for use with external renderers.) Life is good.