Author Topic: Can you control the order in which Atlases are drawn?  (Read 5391 times)

cbartlett

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 43
    • View Profile
Can you control the order in which Atlases are drawn?
« 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. 


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can you control the order in which Atlases are drawn?
« Reply #1 on: May 16, 2013, 01:22:17 AM »
If you modify the 2nd atlas material's render queue, you can.

amaranth

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 21
    • View Profile
Re: Can you control the order in which Atlases are drawn?
« Reply #2 on: May 16, 2013, 02:30:49 PM »
How do you do this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Can you control the order in which Atlases are drawn?
« Reply #3 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.