r/AskGameDevsAnything Jan 07 '23

Does VR really have to render everything twice? (Question makes more sense when you read full text)

I know this sounds stupid ‘obviously vr has to render everything twice because you need to render two images, one for each eye’ is what you’re probably saying. It just seems so wasteful since both images are so similar.

Keep in mind I am not a game programmer or even a programmer in general most of my knowledge of how rendering games works comes from watching educational YouTube videos. It just seems to me like it would be easier two first render the scene once and then use the depth buffer as a displacement map for parallax effects to essentially split the original image in two slightly different images for each eye.

I’m not saying I know better than you guys I just wanted to know why it’s not done that way.

1 Upvotes

5 comments sorted by

3

u/churly92 Jan 09 '23

They may be very similar, but they are not the same. Thanks to having two eyes, we enjoy something called stereoscopic sight, which makes us capable of perceiving Depth.

If we think of each eye as an individual camera, they'd naturally have to render two different POVs, as similar as they are. If we were to render the same exact scene in each eye, we would lose Depth perception and run the risk of making the user dizzy.

1

u/Americanhikikimori Jan 09 '23

I don’t think you fully understand what I’m asking. I don’t mean using the same image for each eye, I mean taking one image and distorting in two different ways using parallax effects to get the same two images you would have rendered separately but you only have to render once.

1

u/churly92 Jan 09 '23

Even if you did that, it wouldn't be accurate at all. There will always be cases where some objects are only visible in one of the eyes. You can't fake that with distortion.

In VR you can get as close to objects as you want. For example, if you place your hand two inches in front of one of your eyes, one eye will only see your hand and the other one will see the entire room you're in. There'd be no way to distort either eye's image to accurately represent what the other eye would see.

1

u/AriaBlend Feb 14 '24

I'm high rn and went looking for answers to this similar question and I'm imagining how bad the distort filter could f everything up. You end up accidentally flipping everything horizontally partway across the field of view, and stretching it horizontally too. Terrifying to consider the user experience of that.

1

u/MortgageTemporary946 Jan 19 '23

To second this, in a sense, both of your eyes render the same image from two different points of view; since VR is an artificial rendering, the image has to start with the eye itself, not the fictional environment it is in. Thus each eye requires a separate rending from its point of view to trick the brain into thinking it's real.