I'm trying to figure out how to make a render that tells the average direction of rays hiting surfaces. In other words a need a render that tells me from where light comes from and how much of that light there is.

I manage to setup general scene for that - using radiosity and colored backdrop. But now I need it for any number of lights (and radiocity).

Example how this works:

I can't find the way making it work via node editor. I think a shader is needed. Can anyone help me?