Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Gundam on January 10, 2014, 03:54:25 AM

Title: How to use custom dynamic font material?
Post by: Gundam on January 10, 2014, 03:54:25 AM
Hi, Aren

I would like to modify the dynamic font rendering via a custom shader, can you please help me understand, how to make this work? UILabel has a Material property available when dynamic font mode is chosen, however if I set a material with the Unlit/Dynamic Font shader, for example, it results in text being drawn with correct colors, but alpha is always 1 - the glyphs are drawn as filled rectangles...

I don't really understand, why is this happening, can you please tell me, what am I doing wrong?
Title: Re: How to use custom dynamic font material?
Post by: ArenMook on January 10, 2014, 05:53:28 PM
You need to select the font's texture. Without it, there's nothing to draw.
Title: Re: How to use custom dynamic font material?
Post by: Gundam on January 13, 2014, 01:04:54 AM
Quote
You need to select the font's texture. Without it, there's nothing to draw.

Aren, I'd love to :) But the font is dynamic and from what I can gather, there is no access to the generated texture... Am I missing something?
Title: Re: How to use custom dynamic font material?
Post by: ArenMook on January 13, 2014, 06:14:40 PM
On the TTF font, you can expand it to reveal the font's texture and its material.
Title: Re: How to use custom dynamic font material?
Post by: Gundam on January 14, 2014, 12:59:44 AM
Oh, so that's what I was missing... Thank you very much! :)