In-game settings

How can I change textures quality at runtime?
Perharps, I need some textureService or material service which will update textures on all materials?