auto-detect and apply vertex attributes