Structured-light depth cameras rely on projecting and resolving coded patterns on a three-dimensional scene with high contrast. The front-end optics of such depth cameras impose a fundamental restriction on the depth-sensing range and accuracy: the patterns only remain sharp within the depth of field jointly determined by the camera and projector. We present here a robust method to improve the depth-sensing range and accuracy for a structured-light depth camera without changing the underlying optical design. Moreover, it shows the unique advantage in macrophotography of highly light-scattering objects. We analyze the proposed method theoretically and validate it in experiments.