googlevr / cardboard

Open source Cardboard SDK and samples
Other
1.48k stars 249 forks source link

iPhone 15 Pro Max displays VR and non-VR at the same time when MSAA is enabled #442

Open LEMPeter opened 9 months ago

LEMPeter commented 9 months ago

SPECIFIC ISSUE ENCOUNTERED

When running VR on an iPhone 15 Pro Max VR and non-VR is displayed at the same time, the non-VR is "on top" of the VR.

~I'm 99% sure this isn't a bug with Cardboard, as I've got an older project and a new empty project where this doesn't occur. I'm at a complete loss as to what can cause this.~

I've tried

SMARTPHONE (please complete the following information):

EXPECTED BEHAVIOR

Only VR to be displayed

VERSIONS USED

Cardboard SDK/Cardboard XR Plugin: first observed in 1.21.0 and still observed in 1.22.0 Unity: 2021.3.32

SCREENSHOTS

vlcsnap-2023-11-06-16h54m49s908

Video: https://drive.google.com/file/d/1SegqEkgWe9ryYYaCjIm7gkcaQ3P11Vtq/view?usp=drive_link

LEMPeter commented 9 months ago

I've figured it out, and I would say it is a bug with Cardboard.

Having MSAA enabled in the Render Pipeline settings causes this issue. I wasn't seeing it on a previous project because it's BIRP, and wasn't seeing it on the new test project I created because by default it was using the URP-Balanced quality which has MSAA disabled by default, whereas my project with the issue is using URP-HighFidelity - which has MSAA x4.

SPECIFIC ISSUE ENCOUNTERED

When MSAA is enabled in URP settings, a non-VR camera is rendered at the same time as VR. I have only observed this issue on the iPhone 15 Pro Max.

Can confirm it DOES NOT happen on: iPhone 11 iPhone 13 Pro Max

SMARTPHONE (please complete the following information):

STEPS TO REPRODUCE THE ISSUE

  1. Create a new URP project
  2. Import Google Cardboard
  3. Go to Project Settings -> Quality and check which quality level is being used, by looking at which tick is green for iOS (probably Balanced)
  4. Go to Assets/Settings and select URP-Balanced
  5. Enable MSAA under 'Quality', issue happens with any level of MSAA
  6. Build for iOS using the sample scene included with Cardboard
  7. Run on device from XCode, observe the issue

EXPECTED BEHAVIOR

MSAA to not cause this double camera on any device

VERSIONS USED

What version of Google Cardboard are you using? Cardboard SDK/Cardboard XR Plugin 1.21.0 and 1.22.0

If you are using Cardboard XR Plugin:

SCREENSHOTS

See first post

SarahBhandiwad commented 3 months ago

Our team is experiencing the same issue using Unity editor version 2022.3.14f1. We have resolved it for now by turning off MSAA, but this is not a long term solution for us. Hopefully the Cardboard SDK will be updated with a proper fix that allows anti-aliasing.

Last8Exile commented 1 month ago

Workaround does not work if MSAA disabled at runtime. It needs to be disabled in URP Asset before build.