FYI, front camera in X uses structural light, while Kinect 2 uses a more modern time-of-flight (ToF) technology, which delivers better depth resolution.
"Face ID is enabled by the TrueDepth camera and is simple to set up. It projects and analyzes more than 30,000 invisible dots to create a precise depth map of your face."
Note that the depth resolution they are desscribing is 160x160=30,000, which is really standard structured light. Put a 1Mpix camera behind it and you can interpolate ~6 pixels in between to estimate depth/slope.