A method for manufacturing or protecting a grating, wherein the grating has a titled multilayer stack comprising a profile having height differences, thereby providing cavities and elevations having a predetermined maximum height difference, the method comprising:
- providing a transmissive layer in the cavities and on the elevations of the grating, the transmissive layer having a first height in the cavities that is larger than the predetermined maximum height difference;
- and
- surfacing the transmissive layer after providing the transmissive layer such that the transmissive layer has a second height on the elevations, thereby providing the grating with a substantially planar surface, wherein the first height of the transmissive layer in the cavities after said surfacing is substantially equal to or larger than the predetermined maximum height difference and the second height on the elevations is about 10-500 nm,
- wherein the transmissive layer is enabled to optically filter incident radiation.