Commit patch by Technologicat (closes LP #1214782)
better management of texcoord inputs
Better handling of texture padding