1. A method for improving lithography performance by correcting for 3D mask effects, the method comprising: receiving a mask layout that contains etched regions, called shifters, that can have a phase shift relative to other regions; choosing a shifter in the mask layout; correcting for 3D mask effects by, iteratively, selecting a region within the shifter, adjusting the phase shift of the selected region in a simulation model to account for 3D mask effects, and modifying the shape of the shifter based on the difference between a desired pattern and a simulated pattern generated using the simulation model.