Patent attributes
A light-shielding layer over a transparent substrate is processed into a predetermined pattern by first etching and then a recess is formed in an underlying layer below the light-shielding layer by second etching using at least the light-shielding layer as a mask. Subsequently, a defect inspection of the recess is performed. If, as a result of the inspection, a residue defect is detected at the recess otherwise formed in the underlying layer below the light-shielding layer, defect portion data of a pattern of a region including a residue-defect portion is produced and a repairing resist pattern is formed on the light-shielding layer based on the defect portion data. Then, third etching is applied to the underlying layer below the light-shielding layer using the light-shielding layer and the repairing resist pattern as a mask, thereby repairing the residue-defect portion.