Where does the engine render a SceneCaptureCube?

Hi,
I want to edit the scene capture cube to also capture scene depth into the texture. I need to find where the engine renders the SceneCaptureCubemap so I can make the required changes.

Does anyone know this or could help if there is a different solution to achieve what I need?
Perhaps there’s a flag to check if the render is coming from a SceneCaptureCube and I could create some post process to do this?

Thanks for the help.