However the objects seem to be “ghosting” through a non-effected objects like the image below- an outline of the object is projecting though. It seems to be doing it for object that have color (if I make it saturation 0 it fixes) but wanted to see if there was a better fix than going though every object to desaturate to not trigger it.
Ah okay I see what is happening. You will need to sample the custom depth buffer in addition to the stencil buffer and compare it to the regular pixel depth to determine what pixels are obscured and mask them out.