Finding x/y screen position of a Metal fragment shader modifier for custom ARKit/SceneKit occlusion
I have a simple ARKit/SceneKit app that draws a cube in front of the camera. Using the depth map, I want to hide the cube pixels that are occluded by an object. RealityKit supports occlusion, but that’s only on objects it is trained to recognize, such as human bodies and planes, and since I’m looking to detect occlusion on a drill, it doesn’t work for me.