Log in or register to post comments

Vuforia 5.0.10 broke UGUI Mask component

December 21, 2015 - 7:44am #11

Hi!.

I have updated our app to the new Vuforia 5.0.10 and I have discovered that all the user interfaces that were using Mask components are broken.

 

Steps to reproduce:

1. Create new project

2. Import Vuforia 5.0.10

3. Create a Canvas.

4. Add an Image to the canvas.

5. Add a Mask component to the canvas and attach a png mask to it and another image to test it.

6. It looks ok on editor, but as soon as you press play and the camera is init, the mask component stop working.

 

Any ideas in how to fix this?

Regards,

Vuforia 5.0.10 broke UGUI Mask component

December 22, 2015 - 4:41pm #10

Can you try this work around and let me know if it resolves your issue?

Increase the stencil value in Assets/Vuforia/Shaders/VideoBackground.shader, on Ln 16 (currently “Ref 1”)

 

If this doesn't work, can you try the following steps

Assets/Vuforia/Shaders/VideoBackground.shader (they are only required for stereo AR):
Stencil {
                Ref 1
                Comp Always
                Pass Replace
            }

Vuforia 5.0.10 broke UGUI Mask component

January 22, 2016 - 9:19am #9

This fixed the problem for me. I increased the Ref to 2 and it now masks correctly.

 

Vuforia 5.0.10 broke UGUI Mask component

February 16, 2016 - 5:49am #8

thank you!

Vuforia 5.0.10 broke UGUI Mask component

February 16, 2016 - 5:49am #7

thank you!

Vuforia 5.0.10 broke UGUI Mask component

February 18, 2016 - 1:39am #6

The next release of Vuforia should include the fix too.

 

Vuforia 5.0.10 broke UGUI Mask component

February 28, 2016 - 3:23pm #5

The mentioned fix still does not with me. I am using Unity 5.0.1 and latest Vuforia release.

I tried a simple panel masking another panel and the mask never works.

 

Please advise.

Vuforia 5.0.10 broke UGUI Mask component

February 29, 2016 - 12:00am #4

Have you tried replacing "Ref 1" with "Ref 250" (or other big number) ?

Assets/Vuforia/Shaders/VideoBackground.shader
Stencil {
                Ref 250
                Comp Always
                Pass Replace
            }

 

 

 

Vuforia 5.0.10 broke UGUI Mask component

February 29, 2016 - 5:44am #3

If I change it to 250 or above the masking works but it becomes weird.

i.e.: It actually shows the UI of the parent and not the masked child.

I am upgrading to 5.3.1 to see if it resolves this issue.

 

 

 

Vuforia 5.0.10 broke UGUI Mask component

February 29, 2016 - 5:53am #2

Unity 5.3.1 + Setting Ref to 250 seems to be working with Masks.

I will work on it more and post if there are any other problems I find.

 

Thank you.

Vuforia 5.0.10 broke UGUI Mask component

March 30, 2016 - 8:15pm #1

I had the same Vuforia bug using unity 4.7 (yeah, I'm one of those who still use Unity 4.x) and the solution for increasing the value did not help.

However,  I was able to workaround by decreasing the Ref value to zero

 

By the way, Vuforia 5.0.10 is the last version that supports Unity 4.x (that's the one I'm using) because the current Vuforia version 5.5.9 does not and give a bunch of errors, hope this helps someone out there.

Log in or register to post comments