Author Topic: Different materials for fonts  (Read 4064 times)

igmon

  • Guest
Different materials for fonts
« on: April 25, 2012, 02:09:33 PM »
Hi,

I would like to know how to go about using different materials for fonts. 

So let's say I have a global atlas that includes all the sprites. Then I have a font configured to reference a sprite in that global atlas.  But I want to have that font use a different material so that I can apply a separate shader used by the font but not by everything else.

So far the only way I can see this work is if I create a separate atlas with it's own texture and put the font's sprite in there.  Then from there, assign it a different shader.  But ideally I'd want only one texture, and maybe have two atlas, each with their own material and use the same texture. Is that possible?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Different materials for fonts
« Reply #1 on: April 25, 2012, 02:53:59 PM »
You don't need to create an atlas for fonts. It's just an option. In the font maker, don't specify an atlas, and it will just create a material for you using the font's original texture.

igmon

  • Guest
Re: Different materials for fonts
« Reply #2 on: April 25, 2012, 11:52:40 PM »
Ah I see.  I missed that part, it even explains it.  I can work with that, so essentially just have different font names that use the same data.  I was hoping to share the same texture with the atlas but have different materials used, but that's fine.

Thanks!