before converting to 1d tex array