Detect brightness/darkness of a scene?

I need to do stuff dynamically in a scene based on whether the camera is seeing mostly dark- or mostly light-colored objects. I don’t need color values, just some sort of brightness value. For example, if the camera is seeing all white stuff, then something would return 1; all dark objects, 0; half and half, .5f, etc.

Any general ideas on what roads to go down here? I’m at a loss…

You’ll definitely need Pro for this if you don’t have it already. The usual solution to this problem is to render the scene to a low res (like 4x4 or 8x8) texture/render target. Then you have the CPU loop over all the pixels in that texture and compute the average brightness. If you want to be really correct, remember that the human eye weights different colors differently.