Scene depth from a lights perspective?

Hello. I was wondering, how can I render the scene depth but from the lights perspective and then be able to use the depth in a material?

By using a scene capture, that is set to depth only.