Image source: Getty Images.

The virtual reality (VR) market is still in its early stages, but its size is expected to reach $70 billion by 2020, according to TrendForce. Small and large companies alike are starting to make big investments in VR, but there are three companies that stand out as potential long-term VR winners: NVIDIA (NVDA 3.71%), Advanced Micro Devices (AMD 1.33%), and Facebook (META -10.56%)

To find out whether these stocks are good buys, let's take a look at what the companies are doing in the VR space:

NVIDIA

NVIDIA's opportunity in the virtual reality market stems from the company's dominant position in the discrete graphics processing unit (GPU) market. Computers that run virtual reality programs need a ton of graphics processing power, and NVIDIA's chips are some of the best in the business. 

The company has about 70% of the discrete desktop PC GPU market right now, and introduced new graphics cards for notebooks earlier this year that should help it grow that market as well. 

NVIDIA has also built its own virtual reality games to show off its GPU capabilities, and many of its graphics cards are already recommended by high-end VR headset makers like Oculus and HTC. 

The stock is red-hot right now, and has climbed 185% over the past 12 months. The company is seeing growth from all of its key business segments (gaming, data center, professional visualization, and automotive), and it doesn't appear that it is slowing down any time soon. 

NVIDIA's price-to-earnings (P/E) ratio is 48 right now, making it a bit expensive relative to the average P/E ratio of 25 for the entire technology sector. But the company has proved that it can successfully enter new markets (like semi-autonomous driving systems) while still growing its core gaming business, and it'll likely be able to do the same with VR. With NVIDIA's dominance in GPUs and a long history of creating great gaming technologies, I think this stock is a good VR buy. 

AMD

AMD is the underdog in the GPU space, but it hardly seems that way sometimes. The company is a direct competitor to NVIDIA, and has gained some ground on it this year. 

Midway through last year the company's discrete desktop GPU market share had fallen to just 18%, but over the past few quarters AMD has gained additional ground and has pushed that back up to nearly 30%.

As in NVIDIA's case, some of AMD's graphics cards are recommended by HTC and Oculus for their high-end VR headsets. And AMD typically offers cheaper cards than NVIDIA (though it sells high-end cards, too), but the company's best angle against NVIDIA is that its graphics cards are found in Sony's PS4.

Sony is a key player in the console VR space with the recent release of its PS4 VR headset. The headset is compatible with the original PS4, along with the newly released PS4 Slim and PS4 Pro (which has slightly upgraded specs). Sony has already sold 40 million units of the consoles and is working with 230 developers to create new VR games and content for the system. 

In short, if Sony succeeds with its VR system, then AMD should benefit from GPU sales. And that's in addition to AMD's own VR-capable graphics card sales for PCs. 

AMD doesn't have any positive earnings right now, but if we look at its price-to-sales (P/S) ratio, the company is relatively inexpensive at 1.97, compared to the tech sector P/S average of 3.36.

AMD's stock price is up 205% over the past 12 months, and with the company's growing GPU market share and success selling chips into the popular VR-capable PS4, I think the stock is certainly worth a look for VR investors. 

Facebook

Admittedly, Facebook's stock-price gains may not be described exactly as "scorching" right now -- the stock is up 15% over the past year -- but the social media company's potential in the VR market is still red-hot. 

Facebook's purchase of Oculus for $2 billion in 2014 gave virtual reality some real credibility at the time and spurred on other tech companies to shift more of their focus to VR. But investors should remember that the company is looking for its Oculus investment to pay off way down the road. 

Facebook CEO Mark Zuckerberg said earlier this year that he thinks it will take a while before virtual reality gets really popular: "VR is going to need 10 years to become a very mainstream big thing." And even Oculus co-founder Palmer Luckey, indicated this year that VR's success could take a while. "It could be five years -- it's more likely to be 10 years," he said. 

But Facebook has the resources to see its initial investment come to fruition, and recent shifts in Facebook (e.g., introducing 360 videos) show that the company is willing to bring more VR-like experiences to its most important platform. 

Facebook isn't exactly a cheap stock. The company trades at more that 46 times its 12-month trailing earnings, compared to the tech sector average of about 25. But investors should keep in mind that the company is continually evolving its social media platform and could implement VR interactions in the near future. Facebook isn't betting the farm on VR, but its early investments in and current commitment to the technology make it a solid buy in the broader VR space.

Any investor looking to tap into the virtual reality market could do far worse than the stocks listed above. And while there's no guarantee that Facebook, AMD, or NVIDIA will be huge VR winners, all are making the right moves right now to set themselves up for exactly that.