A technique for building optical filtering functions directly into a piece of optical fiber based on interferometric techniques. Usually this is accomplished by making the fiber photosensitive and exposing the fiber to deep UV light through a grating. This forms regions of higher and lower refractive indices in the fiber core.