Woops, had to separate more functions in texture 3D and texture 2D