A layered heterostructured coating has functional characteristics that enable the controlled release of volatile agents. The coating has photocatalytic properties, since it uses titanium dioxide, its derivatives or materials with similar photocatalytic properties (2), which upon solar irradiation open and/or degrade nano or microcapsules (3) and subsequently releases in a controlled form the volatile agents contained in them.