An apparatus with a grating structure and a method for forming the same are disclosed. The grating structure includes forming a wedge-shaped structure in a grating layer using a grayscale resist and photo lithography. A plurality of channels is formed in the grating layer to define slanted grating structures therein. The wedge-shaped structure and the slanted grating structures are formed using a selective etch process.