To be more clear…
Scene Capture Depth Source Ignores Sphere Mask when it is used for Opacity Mask Calculations in the material.
At least this seems to be the case to me.
Attempt to check the scene’s depth with a scene capture component and you’ll see any opacity mask set by a sphere mask is ignored, but if you set the opacity mask via other means like just plugging in a texture sample with some varying alpha and depth capture picks it up.
See below screenshots.
Not working using sphere mask
Working no sphere mask
EDIT: More tests indicate it might be the use of Camera Position rather than sphere mask that is the real issue here.
EDIT: It isn’t sphere mask it is most certainly the use of Camera Position node preventing depth capture from updating when opacity is tweaked with any math using Camera Position node.