I’m having this exact same problem for the game I am developing. No easy way to reproduce, but I’m getting it once in a while on multiple PCs with different Oculus headsets and I have no idea how to fix it. The above comment mentions networking. I too am using a little bit of networking, but nothing heavy and it’s not really an option not to use networking anyway. If only I had a consistent reproducible case, then I could test out different things, but I simply can’t reproduce on command yet.
I’ve seen this error on and off since maybe the summer of 2019 in my Unity game, I don’t recall exactly when or if I introduced any particular new changes at the time.
I am usually using the latest Unity version, so probably first seen on 2019.1.x
Only tested with Windows 10
Game is configured with single-pass rendering and standard render pipeline
Error only seen with Oculus Rift so far, not seen with HTC Vive yet
Seen with both Oculus SDK and OpenVR SDK
Seen in both editor (game tab + inside headset) and in standalone build (only in headset, game window was unaffected the last time I checked)
Seen on multiple PCs and headsets
Sometimes it fixes itself after maybe 10-20 seconds, but usually I have to restart the game or the Unity editor.
Sometimes it happens early in my simpler startup/lobby scene. Sometimes it happens after 30 minutes of playing in levels with post processing effects and way more detailed scenes.
I have no idea what is causing it or how to fix it and it feels like a bug with either Unity or Oculus or both.
My best theory right now is perhaps single-pass rendering mode, which I enabled maybe around early spring 2019.
Another theory is that I’m using some post processing effects, such as Bloom and Color Grading, that maybe has some issues. Historically the post processing stack has had its share of problems, in particular with single-pass rendering mode. However, I’ve seen this on scenes without post processing so I’m kind of ruling it out.
A third theory is that I started getting this after complying with Oculus’ requirements to pause the game, mute the audio and deactivate the avatar and other VR-pose driven elements when the headset is removed or opening the Oculus dashboard in order to support Oculus’ overlay dashboard. But I don’t recall if this error started before or after this change.
Hoping someone from Unity can reach out and give some pointers on how we should proceed to fix this. I’m happy to assist in any way I can to help provide debugging information.
@hellowill89 did you find anything more on this issue?
I’ve raised a support ticket with Oculus to hopefully to get some assistance as it’s impacting my customers and I need to resolve it fast.
@hellowill89 I think I have finally found the root cause of the problem.
Post Processing does not seem to work with Adaptive Resolution. I have tried older versions and the latest versions.
I’m using OVRManager and enabled Adaptive Resolution with min 0.7, max 2.0 values.
Simplest repro so far
I don’t think this bug is limited to VR and Oculus, but this is my current setup.
Start new project with 3D template on Unity 2019.2.17f1
Import packages Post Processing 2.2.2 and Oculus Desktop 1.38.4
Import Oculus Integration 12 from asset store
Empty scene, add Camera with Post Process Layer and OVR Manager
Enable Adaptive Resolution on OVR Manager and set min/max to 0.7/2.0.
Enable Oculus XR SDK and connect Oculus Rift
Enter play mode, you should be able to look around with the Rift. The image should degrade fairly quickly with scaling issues, but maybe not 100% of the time.
If you fail to reproduce, maybe it helps load a heavier scene, something that causes adaptive resolution to change the render target resolution.
You can also try dragging the max slider during runtime. I could only drag it to higher values, so you’d have to start with max=1.0 or something.
Workarounds
Don’t use post processing, not a good option for me.
Don’t use adaptive resolution, I’ll be doing this for now.
Related to Dynamic Resolution
I’ve learned this is not the same as Adaptive Resolution, which uses renderViewPortScale and eyeTextureResolutionScale. It did however have similar bugs in Post Processing v2 and was fixed earlier this year. Maybe the fix for Adaptive Resolution can reuse some of that work?
Same issue here. The double vision occurs when using Single-Pass Stereo and when using a custom shader written for single pass in mind. The shader is a simple fader shader, which is used in OnRenderImage() with the Graphics.Blit() function. If this code is disabled, so the shader is not used, the effect goes away.
in the shader. This could be the reason it shows double vision (screenspace + screenspace).
If you are just using this shader to fade in/out, then I would suggest to use the script in Oculus library called as ScreenFade.cs/ScreenFader.cs. It will be attached to CentreAnchorCamera under OVRCameraRig and works better.