As feature size get smaller, it's crucial to gain depth of focus (DOF) common window in optical lithography. In addition to the DOF of individual patterns, the shift of the best focus between various patterns is significant reducing the common DOF. High-order spatial frequencies diffracted from sharp corners and small patterns on the mask induce additional phase terms and can shift the best focus significantly. We analyzed the correlation between the pattern shape after OPC correction and its corresponding DOF, and found that more complicated shapes lead to more focus shift. Wafer experiment and simulation confirm the predictions. This provides another index for future OPC application.