fix the issue of generating nonscense comma in SampleTexture