-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VR Compatibility #9
Comments
VR isn't supported. I don't have VR kit to test it and I don't plan to buy one. I'll accept pull request if somebody finds a way how to fix it and I'll update readme for now. |
Hi, just to provide some further insight, I attempted to use the Oculus SDK OVRCameraRig which allows you to choose either two separate cameras (one per eye) or a single one. Unfortunately, this didn't work properly with either. When adding the Volumetric Light Renderer to each eye's camera separately, by default the volumetric lights appear only in the second camera (right eye) but not the first one (left eye). If you change the "depth" of the camera, the camera with the lowest depth shows the effect whilst the other one does not. Switching between deferred and forward rendering for both cameras also does not change the behaviour. One interesting point is that if you choose Single Pass Stereoscopic Rendering as opposed to the default Multi-Pass Stereoscopic Rendering, there are problems because the shader breaks the image (get a weird overlay and resolution is all wrong - it seems that a lot of effects, even standard Unity ones such as "Bloom" or "Sun Shafts" etc. also break) but it seems like the effect works for both cameras. So possibly there is a compatibility issue with the multi-pass rendering? @SlightlyMad I would be willing to help with testing of new changes and contribute in any way. Thanks. |
@SlightlyMad I'm also willing to help test any changes on the HTC Vive. That way we can cover both platforms. |
Pinging @Knive, @Edgyy and @chrisnobrega to check if any of you looked into this further. Maybe we can figure out what is going on together. Trying the examples with the SteamVR plugin I can get the effect to work on one eye at a time only:
I'm new to Unity and not quite sure about the way the two images for your different eyes get rendered. When I put a debug script line into the
|
This is exactly the issue. Set the camera to only draw to one eye, and create a separate camera for the other eye, that will work fine! |
Unity hangs when i have two Steam VR_Camera cameras in the SteamVR rig and press play |
The issue here is the steam vr camera component. You should only have one of that. |
I got this working on Unity 2017.3.0f3 Tried on HTC Vive and it looks pretty good. The Directional light examples all worked but spotlight ones render to one eye hence the workaround above. |
For now, it works in Unity with Multpass on. I am using Unity 2017.4.8f1 and OpenVR. It is correct rendered on both eye if the light don't cast any shadow. Wired thing about light casting shadow, it only show on the left eye. I am looking into this now. |
The lights are great but in VR (with an HTC Vive), they are somewhat shifted from the original position in both the right and the left eye but on different positions depending on the eye.
The text was updated successfully, but these errors were encountered: