Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: cbartlett on May 15, 2013, 06:12:59 PM

Title: Can you control the order in which Atlases are drawn?
Post by: cbartlett on May 15, 2013, 06:12:59 PM
I have had to make a second atlas because the first broke the 2k size and won't display on some iphones.  I removed one of my fonts and placed it in a second atlas.  I have read the posts on how the draw calls and materials work.  What I am hoping someone can answer is : can I control in which order the two materials are called?  I would like to guarantee that the new font atlas is always called after the original one because I am making sure that the font is ALWAYS on top. 

Title: Re: Can you control the order in which Atlases are drawn?
Post by: ArenMook on May 16, 2013, 01:22:17 AM
If you modify the 2nd atlas material's render queue, you can.
Title: Re: Can you control the order in which Atlases are drawn?
Post by: amaranth on May 16, 2013, 02:30:49 PM
How do you do this?
Title: Re: Can you control the order in which Atlases are drawn?
Post by: ArenMook on May 16, 2013, 02:33:06 PM
material.renderQueue = ...

...or create a custom shader with it hard-coded there. Transparent/Overlay will do this out of the box.