VR related mask shader issue?

UI mask do not work with Google’s Cardboard SDK?
It works properly with the Oculus Mobile VR plugin but with the Cardboard SDK the masks seem to be gone.

This screenshot demonstrates it, outside of the white box we should not see any text.

In editor as well in VR Mode disabled it looks fine.

  • Did anybody encounter this issue and know how fix?
  • In which direction should I investigate further?

I already tried the builds on Note 4 and Galaxy S3 with two different projects just to be sure. Logs didn’t show striking lines. I googled and did not found anything related to this issue. Answers and forums the same.

Any suggestions highly appreciated!

UPDATE

I’ve came across the same issue with the Oculus Mobile SDK / GearVR Note4 as well. This happens when in the OVRCameraRig the Texture Depth is set to 16 instead of 24 bit.

Hi I’m currently having the same issue with Unity 5.4.2f2-GVR10 only on a cardboard build. Do anyone have solved it yet ?

The UI Mask works just fine on Gear VR with a normal build.

I discovered this still happening in Unity 5.6.0f1 with Google Cardboard. I was able to fix it by going into the Cardboard SDK settings (PlayerSettings (Android) → Other Settings → Virtual Reality SDKs → Cardboard) and switching the depth format to “24-bit depth | 8-bit stencil” (since the UI mask uses the stencil buffer). This solved the masking problem for me.

Remove the Mask component and add a new componet, the Rect Mask 2D, solved for me using Google Cardboard

I’m having a similar issue. When using the mask, the hole screen is black on both eyes. Switching to 8-bit stencil and using Rect Mask2D did not solve the issue.
I’m using Unity 2018.1
Any Ideas?