Spatially varying grating structures formed at the subwavelength scale behave as a layer with an artificial effective refractive index that is dependent on the local fill fraction. We describe a novel technique to pattern gratings with a spatially varying fill fraction using a simple two-step exposure process. The first exposure forms a partial latent image of a grating in the photoresist. The resist is then saturated by overlaying an exposure with an analog spatially varying intensity, generated by using a phase-only masking technique. The cumulative exposure dose from the two steps was designed so that the point of minimum intensity will still develop the photoresist through, in all the spaces in the grating. By varying the exposure window around the saturation dose, the fill fraction of the patterned gratings was modulated; thus, the size of the space cleared at any location in the grating is a scalable function of the local cumulative dose delivered. Constant feature height is achieved across the patterned area by keeping the second exposure dose below the resist threshold exposure value. The exposure process was modeled numerically to predict the relationship between the local dose and patterned fill fraction. This technique enables rapid, low-cost fabrication of apodized grating structures for applications in diffractive optics technology.