In order to measure the surface of object's 3D contour, we proposed a phase shifting shadow moiré technique based on varying light position. The method can remove the mechanical motion in the process of measurement, and sample the fringe pattern of phase shifting quickly. However, when we sample the sequence of phase shifting with the method of varying light, because of the light position changed, the background and amplitude of fringe pattern will be modulated. so the classical method of phase shifting can't be used for picking up measurement phase, so as to solve this problem, A new shadow moiré method based on the spiral phase transform (SPT) is proposed in the process of demodulating phase, this method need to use two frame images of varying light position, and calculate phase shifting in sequence, estimate the height of measurement, finally, a new iterative algorithm of adaptation is designed to pick up measurement phase. The experimental results show the effective of this method.