the present invention is directed to an improved method and apparatus for detecting defects in photomasks containing features with different arbitrary orientations , said apparatus including in one form therof a detector for detecting orientations of the features so that the optical signals from the features may be suppressed by suitable apparatus such as spatial filtering . the spatial filtering is adjusted electronically based on the determined orientation of the mask features . in one form of the invention the spatial filtering is effected by accepting photodetected signals from only a selected number of photodetectors in a photodetector array , the selection being determined by the orientation of the mask features .