Overlay measurements for a semiconductor wafer are obtained by forming a
periodic grating on the wafer having a first set of ridges and a second set of
ridges. The first and second sets of ridges are formed on the wafer using a first
mask and a second mask, respectively. After forming the first and second sets of
gratings, zero-order cross polarization measurements of a portion of the periodic
grating are obtained. Any overlay error between the first and second masks used
to form the first and second sets of gratings is determined based on the obtained
zero-order cross polarization measurements.