Nonuniform photobleaching of dyed polymers for optical waveguides