This paper presents a novel technique for measuring the three-dimensional shapes of specular surfaces. Differing from the conventional techniques, the diffusive light source in our technique can be moved vertically to two different positions, and at each position the phase distribution of the deformed fringe pattern is measured, so that the orientation of incident light for each pixel is tracked through the corresponding phases. The 3-D coordinates of points on the specular surface are further determined. In so doing, the restrictions and limitations of the existing techniques in computational complexities, phase ambiguities and error accumulations are eliminated. The validity of this technique is demonstrated by experimental results.