I made some progress with this. I figured out that the issue has to do with the Scene Depth (that it gets from the scene vs the Depth Map that is saved into the alpha channel of the texture map.
I have had the SceneTexture.SceneDepth divide by a number like 2000 and then input to the Red channel Component Mask. Then it compares the Scene Depth and Depth Map to figure out what is front or back. So far, it’s sort of working but it has some clipping and overlapping even when I try adjusting the number. It’s not smooth. Also, I tried a higher resolution Depth Map, it did better but then it had other clipping issues.
Is there a better way to do depth maps? Why should I compare the scene depth and depth map? I don’t know how others have done this so well while I am having issue with clipping and overlays. See below:
Any suggestions or help would be greatly appreciated!