Texture coordinate generation (not well tested)