Hotrian / OpenVRDesktopDisplayPortal

Put your favorite Desktop Window directly into any OpenVR game!
Other
449 stars 96 forks source link

Side by side content? #56

Closed duig0 closed 7 years ago

duig0 commented 7 years ago

Would it be possible to display side by side content full screen with each image displayed correctly in side by side?

Thanks in advance

Hotrian commented 7 years ago

Not that I know of. The OpenVR API does not allow you to control the display to eye in this way. You feed a single texture in, and the Compositor handles turning them into Overlays and displaying them.

Edit: You can display multiple Overlays, but you can't display a single overlay to a given eye or set a texture that can display one side per eye. OpenVR does not currently have an API for these last I checked.

Edit2: Looks like this was wrong, see my comment here.

duig0 commented 7 years ago

Many thanks for your reply.

Aesop112 commented 7 years ago

What an awesome idea

Hotrian commented 7 years ago

Too bad it is not currently possible using the Overlay system :P

Aesop112 commented 7 years ago

It is, maybe someday

Hotrian commented 7 years ago

Wow was I wrong about this. It wasn't available in the SteamVR Unity Plugin, but it actually was available in the SteamVR API. Looks like it was added to the SteamVR API back in May 2016, but I had no idea it was available in the C code because it wasn't added to the C# code yet. The C# code is quite outdated, unfortunately. I possibly could have added support for it to the C# side, but I hadn't gone digging through the C code enough to know it existed.

Will look into adding Side By Side support in the future, though I don't know if it will break anything or if it will work properly.

Edit: Totally works. Will be adding SBS support in the future. SteamVR does seem to have support for flipping the left and right eyes too (incase your source file is inverted) but this doesn't seem to do anything. With the next release of OVRDDP you'll also be able to watch Full HD content (Windows 8+ only), so this will be pretty great :D

Edit: Figured out how to fix inverted mode (where the left half is shown to the right eye, and vice versa). Looks like they screwed up in the API and used the wrong flag somewhere, and I just happened to find the correct flag :o.

Hotrian commented 7 years ago

This is now in OVRdrop, which is the closed source Steam Release of OVRDDP. Since I will continue to incorporate feature requests from OVRDDP into OVRdrop, I am closing this issue now.

If you are interested, you can find OVRdrop on Steam here.