Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: metaleap on September 22, 2013, 12:52:47 AM

Title: Color tint for UILabel doesn't work... o_O
Post by: metaleap on September 22, 2013, 12:52:47 AM
Or what's the trick?

Texture import for my custom bmFont is Alpha8 (because that's how I exported it and that's all that's needed in a bitmap font).

The material is using Unlit/Transparent Colored.

A Label using the font is always showing only black-colored glyphs. Setting color tint changes nothing. If adding an outline, that too is black no matter what color is used.

Previously I used the SciFi example atlas but I gotta move on to my own font. I'm not using an atlas here for the font at all, so I'm thinking R8 should be a fine format. Only 300k for 512x512 that way, kinda better than multiple mega-bytes..

Guess I gotta move to an atlas with full RGBA right? Oh well...
Title: Re: Color tint for UILabel doesn't work... o_O
Post by: ArenMook on September 22, 2013, 01:05:03 AM
If you're concerned about texture space, stick to dynamic fonts. Alpha8 doesn't have RGB info at all, meaning it's 0 (thus black). It's either that or you have to write a custom shader just to draw your text.

Edit: Come to think of it, just use the GUI/Text Shader.
Title: Re: Color tint for UILabel doesn't work... o_O
Post by: metaleap on September 22, 2013, 12:34:09 PM
Yeah switched to rgba for now to move forward. One day I'll go back to look into packing it all into 8-bit font-texture atlases. After all it's 256 intensity values per pixel rather than just 1-bit on/off or black/white so should still be possible to display nicely. But yeah that's for another day..