SAN FRANCISCO (MarketWatch) -- Facebook Inc. FB, -0.89% said late Tuesday it agreed to buy virtual reality tech company Oculus VR Inc. for $2 billion. The deal includes $400 million in cash and 23.1 million shares of Facebook, plus an added $300 million payout in cash and stock given certain milestones. The transaction is expected to close in the second quarter. The acquisition is dwarfed Facebook's $16 billion acquisition of WhatsApp in mid-February. Facebook shares declined 1.1% to $64.18 in after-hours activity.