Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: igmon 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?
-
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.
-
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!