Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: thePostFuturist on January 04, 2015, 08:14:03 PM

Title: NGUI Sprites get garbled when used along with the Vuforia AR plugin
Post by: thePostFuturist on January 04, 2015, 08:14:03 PM
Hello,

I'm working with the Vuforia AR plugin, and NGUI Sprites keep getting garbled when used together: alpha channel gone (now black bg), letters in text become rectangles.

I've tried a few things, such as forcing Unity to include the shaders provided by NGUI, to no avail.

Vuforia creators think this might be due to the shaders' render queue: https://developer.vuforia.com/forum/unity-3-extension-technical-discussion/ngui-vuforia

This is something I haven't tested and am not even quite sure how to test.

Last thing: in the attachment screenshot you will see a garbled NGUI Sprite. Underneath it, however, is a texture that Vuforia uses, which preserves its alpha and seems to be unaffected.

Thanks for reading.
Title: Re: NGUI Sprites get garbled when used along with the Vuforia AR plugin
Post by: ArenMook on January 05, 2015, 12:12:28 PM
I am not familiar with Vuforia. The shaders NGUI uses are very simple. They're basically the same thing as Unlit/Transparent, except with vertex colors. They don't write to depth, but they do use alpha, like all transparent shaders.
Title: Re: NGUI Sprites get garbled when used along with the Vuforia AR plugin
Post by: thePostFuturist on January 06, 2015, 11:21:23 AM
Which shader corresponds to a regular UISprite chosen from an atlas?

I should also note that Unity's new nuGUI is unaffected. Both text and graphics render the same.
Title: Re: NGUI Sprites get garbled when used along with the Vuforia AR plugin
Post by: ArenMook on January 07, 2015, 01:09:16 PM
Depends on the atlas you chose. Select the material used by your atlas and you will know.