fix: write texture param based on type