Correct Occlusion with the Depth Camera

hi All,

Are there any ways to access the depth buffer of the scene in realtime? I want to modify the depth buffer (Stencil buffer) in real time and combine with the depth buffer from the depth camera to obtain the correct occlusion in Unreal Engine?

Thank you!