Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: clappin on October 01, 2012, 05:34:15 PM
-
I have added a shuriken particle effect as a child to a UIButton object. Both button and particle effect are in the same layer. No matter what I do to the Z of the particle effect, it is always drawn behind the button. What am I supposed to do to have the particle effect on top of the button?
UI Root (2D)->Camera->Anchor->Panel->Button->ParticleEffect
Layer=UI
ParticleEffect Z = -1.0
Button Z = 0
-
Sounds like the shader used by your particle system is always drawn before the NGUI's Unlit/Transparent Colored queue. Adjust your particle shader accordingly.
-
I have a similar issue. I have a background sprite and an ammo sprite. Both the are in the same atlas. I want to add a shuriken particle system in between them (to make the ammo look like it is glowing). So the order would be, from back to front:
Background | Particle System | Ammo
The problem is, since the background and ammo are both drawn on the same draw call (because they are in the same atlas), when I mess with the Z of the particle system, it is always either behind or in front of both, but never in between.
Any idea how I could solve this problem without putting the background and ammo sprites in different atlases?
Thanks!
-
Nevermind, on the main panel I checked the "Depth Pass" check box and that did the trick. Thanks for making a fantastic tool.
-
Sounds like the shader used by your particle system is always drawn before the NGUI's Unlit/Transparent Colored queue. Adjust your particle shader accordingly.
This is exactly what the problem was. Thank you so much for your help.
-
Sorry for raising an old thread, but I'm trying to figure out how to display particles over NGUI Sprites.
How do I affect the draw order of shaders?
-
http://www.tasharen.com/forum/index.php?topic=776.msg34546#msg34546