Nanomaterials for textile processing and photonic applications