From Popular Science:
Future shirts and socks could clean themselves using just sunlight, chemists report — all you’ll have to do is drape them over the balcony and voila, clean laundry. A coating of titanium dioxide makes this possible.
Titanium dioxide is found in products like solar panels and sunscreen — it absorbs ultraviolet light — and in several cleaning products, because it can be used to oxidize organic material. Cement, paint, windows and even odor-free socks contain TiO2, which is prized for its ability to kill microbes and break down dirt.
For more, see: Modified Cotton Cleans Itself When Exposed to Sunlight