A functional film, formed by reactive sputtering onto a glass substrate, includes a transition layer comprising a first constituent selected from aluminium and silicon and at least one second constituent selected from oxygen and nitrogen, the first and second constituents have gradual concentration gradients according to the thickness of the film. Deposition is performed with gradual change in the composition ratio of the respective constituents forming the oxide or nitride. The content gradients are distributed such that the refractive index of the film gradually increases or decrease in the incident direction of external light in the direction of the thickness of the film. A second aspect of the invention provides a film having conductivity via the deposition of a further metallic layer.; The film has good mechanical, optical and electrical properties and can be used as the black matrix of a display device.