Binary pattern defocused projection is a promising method of measuring 3D shapes. However, deep or long-distance defocus prevents high-accuracy 3D measurement. The triangle pattern is preferred because of its slight defocus and ability to overcome the nonlinear gamma. Thus, a novel method combining triangle pattern slight defocus with phase shifting is proposed. The proposed method has two merits: (1) Compared with the sinusoidal pattern, the proposed method can overcome the nonlinear gamma. (2) Compared with the binary pattern, it has the advantage of slightly defocusing to an ideal sinusoidal pattern in a short distance. Thus, the measurement error caused by nonlinear gamma and deep defocus is reduced. The RMS error of the proposed method is <0.03 mm. Theory analysis and experiments demonstrate the feasibility and superiority of the proposed method.