serialize texture