A texture formation mechanism during electrodeposition