Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: wildmandnd on October 20, 2013, 04:23:22 AM

Title: NGUI 3.0.2 and particles - how to make depth sort right?
Post by: wildmandnd on October 20, 2013, 04:23:22 AM
Hey, I've upgraded to 3.0.2 and sorted out all issues with the widgets. The problem I can't solve is with particles: NGUI widgets are rendered on top of any particles in the screen. I've tried Shuriken ones as well as some legacy with no luck. Changing camera's type from "UI" to "World" does not help.

It seems the issue is not only with the particles, but any non-NGUI object, like cube or sphere. Widgets are being rendered on top of them no matter what.
How that could be fixed so other objects get the right z-sorting?
Title: Re: NGUI 3.0.2 and particles - how to make depth sort right?
Post by: pahe on October 20, 2013, 05:21:27 AM
Maybe this  (http://www.tasharen.com/forum/index.php?topic=5841.msg27662#msg27662)helps you, I asked the same question with 2.7 (when depth sorting was introduced) and my particles still work correctly with this custom shader.
Title: Re: NGUI 3.0.2 and particles - how to make depth sort right?
Post by: wildmandnd on October 20, 2013, 05:59:10 AM
Thanks, I've added second camera for particles render and it works like a charm.

However question is still relevant as it is unclear how to make a "sandwich" with NGUI widgets and other objects like cubes.
Title: Re: NGUI 3.0.2 and particles - how to make depth sort right?
Post by: ArenMook on October 20, 2013, 04:09:38 PM
I've answered this question before. Short version: put your particle systems on a render queue of 3000+depth, where depth is where you want them to be.