Your phone knows how far away things are — and it uses that knowledge constantly. When Portrait Mode blurs the background behind a subject, when Face ID unlocks the screen, and when autofocus locks on in a dimly lit room, a tiny depth-sensing module is quietly measuring distances in real time. The technology behind most of these features is called time-of-flight (ToF), and on Apple’s Pro iPhones it takes the form of a dedicated LiDAR Scanner. Here’s how it all works — and why it matters for the photos you take.
How a Time-of-Flight Sensor Works
Time-of-flight is exactly what it sounds like: the sensor measures how long light takes to travel to a surface and back. Light moves at roughly 300,000 kilometres per second — about 0.3 metres per nanosecond — so even a round trip of a few metres returns in billionths of a second. A ToF module has two parts: an emitter that fires a burst of infrared light, and a receiver that detects the light that bounces back. Because the speed of light is constant, the round-trip time converts directly into distance.

A smartphone ToF sensor doesn’t measure a single point — it floods the scene with a grid of hundreds of infrared dots, times each one’s return, and builds a coarse depth map: a low-resolution image in which every pixel stores distance instead of colour. That depth map is what Portrait Mode, AR apps, and the autofocus system read to understand the 3D shape of the scene.
Direct vs. Indirect ToF — Apple LiDAR vs. Android’s Approach
There are two main ways to build a ToF sensor, and Apple and most Android phones chose different paths.
Direct ToF (dToF) is Apple’s LiDAR Scanner. It fires very short laser pulses from a vertical-cavity surface-emitting laser (VCSEL) array at an eye-safe infrared wavelength, then uses a single-photon avalanche diode (SPAD) sensor to time exactly when individual photons return. Introduced with the iPad Pro in 2020 and arriving on the iPhone 12 Pro the same year, the LiDAR Scanner projects roughly 576 infrared points and fuses the returns into a depth map. It reaches about five metres indoors, is accurate to within a centimetre or two at close range, and — crucially — works in total darkness, because it brings its own light.

Indirect ToF (iToF) is what most Android flagships used when they shipped a dedicated depth sensor. Instead of timing a single pulse, an iToF sensor emits a continuously modulated infrared wave and measures the phase shift of the returning signal to infer distance. Samsung’s Galaxy S10 5G (2019) carried two such ToF modules — one front and one rear — and Huawei’s P30 Pro added a rear ToF sensor the same year. Sony became the dominant supplier of these compact ToF image sensors. The trade-off: iToF produces a lower-resolution, noisier depth map than dToF, which is one reason Apple’s LiDAR feels more precise.
The Other Depth Tricks: Structured Light and Stereo Vision
ToF isn’t the only way a phone sees in three dimensions.
Structured light is the technique behind Face ID. Since the iPhone X in 2017, Apple’s TrueDepth camera has projected a pattern of roughly 30,000 invisible infrared dots onto the face and read how the pattern distorts as it wraps around facial contours, building a precise 3D map for secure authentication and Animojis. It is extremely accurate at close range but, unlike LiDAR, is not designed to measure a whole room.
Stereo vision (or depth-from-disparity) needs no emitter at all. Two cameras view the scene from slightly different positions, and software compares the offset between the two images — the same way your eyes judge distance. It works well outdoors in bright light, where ToF can struggle against ambient infrared, but fails on textureless surfaces such as a blank wall, because there is nothing to match between the two views.
Most modern phones blend these techniques, and the main camera’s dual-pixel phase-detection autofocus even contributes a rough depth signal of its own.
Why Depth Sensing Matters for Your Photos
Depth data is what turns a flat photo into something with believable dimensionality. In Portrait Mode, a depth map tells the software exactly where the subject ends and the background begins, so blur can be applied selectively. On LiDAR-equipped iPhones, the sensor also feeds the autofocus system — in very low light, the camera can measure the distance to the subject even when there is barely enough light to focus on, locking focus far faster than contrast detection alone. And in augmented reality, depth lets virtual objects sit on real surfaces, disappear behind furniture, and stay locked in place as you move.
Conclusion
Time-of-flight, structured light, and stereo vision are three different answers to the same question: how does a flat sensor understand a three-dimensional world? Apple bet on direct ToF with the LiDAR Scanner, Android experimented with cheaper indirect ToF, and every modern phone now blends depth from multiple sources. The result is cameras that focus faster in the dark, portraits that separate subject from background more convincingly, and AR that feels anchored to the real world — all powered by invisible infrared light travelling at the speed of light.
FAQ
Do all iPhones have a LiDAR Scanner?
No. Only Pro models (iPhone 12 Pro and later) and certain iPad Pro models include it. Standard iPhones still offer Portrait Mode, but they rely on the main camera’s focus pixels and software rather than a LiDAR sensor.
What’s the difference between LiDAR and Face ID’s TrueDepth?
Both are Apple depth systems, but TrueDepth uses structured light — a projected dot pattern — for close-range face mapping, while LiDAR uses direct time-of-flight pulses to measure an entire room up to about five metres away.
Why did some Android phones drop their ToF sensor?
Dedicated iToF sensors added cost and bulk for a depth map that software — using the main sensor’s phase-detection pixels — could approximate. Several makers later removed the module, though depth sensing remains central to portrait and AR features.
Does ToF work in sunlight?
Direct ToF such as Apple’s LiDAR works outdoors, but strong ambient infrared from sunlight adds noise and can reduce effective range. That’s one reason phone makers also use stereo vision in bright conditions.