X Ray effect

Hello community. Could someone help me? I’d like to do an x-ray effect for an architectural project I’m doing. I would like to see the structure, power grid and everything through the walls. I know how to use custom depth for this but I wanted to use this effect as if it were a flashlight and only see the effect where the flashlight illuminates. Does anyone know how I can do this?

Combine custom depth with custom stencil as described here: