googlevr / cardboard

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

No spotlight in VR mode on iOS Unity 2019.3 #236

Closed AmigaAbattoir closed 3 years ago

AmigaAbattoir commented 3 years ago

In a project we are trying to migrate from the old Google VR SDK using Unity 2019.2, to the Cardboard SDK with Unity 2019.3, it seems that spotlights do not get rendered in VR mode:

IMG_0004

but if we toggle to Magic Mirror mode, they appear fine.

IMG_0005

This build is running on iOS (14.something) and was built using Unity 2019.3.15.

amjadalth9 commented 3 years ago

Could you please help me about how to build an ios app with vr in unity? i have tried many and many solutions but i had problems

amjadalth9 commented 3 years ago

Please answer me

AmigaAbattoir commented 3 years ago

Could you please help me about how to build an ios app with vr in unity? i have tried many and many solutions but i had problems

Unless you are running into the same issue with your builds, you should really open a new issue and explain what steps you took tried and detail what errors happened so that someone may point you in the right direction. First place to start is the Unity Quickstart for Cardboard at https://developers.google.com/cardboard/develop/unity/quickstart

Mandelbrow commented 3 years ago

Hi, Have you checked the settings for lighting, and the graphics quality settings for the max number of spotlights to render in a scene? Perhaps the render pipeline, and materials also has to be set up for real time illumination?

AmigaAbattoir commented 3 years ago

Have you checked the settings for lighting, and the graphics quality settings for the max number of spotlights to render in a scene? Perhaps the render pipeline, and materials also has to be set up for real time illumination?

I was upgrading from 2019.2 using the default rendering. The default quality level was set for Fast, and I tried with both 1 and 2 Pixel Light Count. In both cases, the spotlights show up fine and everything is lit correctly in Magic Mirror mode but in VR mode no spotlights show up.

AmigaAbattoir commented 3 years ago

Also, I just used the same project to build for Android, and the spotlights show up in both VR and Magic Mirror. Both iOS and Android have the Graphics APIs for OpenGLES3 and OpenGLES2. I've tried changing the iOS ones, to just OpenGLES3 and to just OpenGLES2. All of the do not render a spotlight in iOS.

jballoffet commented 3 years ago

Thanks for reaching out to us! Sorry for the long delay here. @AmigaAbattoir, based on your last comment, I understand the issue takes place on iOS but not on Android, when using either OpenGLES2 or OpenGLES3.

Could you please share a simple repro project where the issue is depicted and the steps required to reproduce it? That would be really helpful in order to help solving it. Thanks!

AmigaAbattoir commented 3 years ago

I cannot reproduce it starting with Unity 2019.3 with the Cardboard SDK. Our project that this issue is happening in is a pretty big one, so I will try to make a project in 2019.2 with the Google SDK, and then update it to 2019.3 and then updating to the Cardboard SDK soon.

AmigaAbattoir commented 3 years ago

Unfortunately, I cannot mimic what happens by taking a 2019.2 Google VR SDK -> 2019.3 Cardboard SDK. It seems to only happen with this project, which had been updated through several versions of both the Google VR SDK and Unity.

I've played with a bunch of Lighting settings, things work as expected in Magic Mirror mode and not in VR Mode. It seems similar to when I built with Single Pass instead of Multi Pass, but according to output from XRSettings.stereoRenderingMode.ToString() it does say multi-pass.

I've tried deleting Library/, clearing Unity Cache Server since it was using Asset Pipeline 1, deleting old XCode caches and build folders and still end up without spotlights in iOS in only VR mode.

AmigaAbattoir commented 3 years ago

Updated to 2020.2 and the spotlights reappeared. Looks like 2019.3 is the culprit!