Advertisement

Channel information invalidating texture for BMFont

Started by May 24, 2015 10:19 PM
10 comments, last by WitchLord 9 years, 6 months ago

Since I am continuing to look into my issue with alpha when rendering the BMFont textures, I am wondering why store the channel information at all? Why not just have white text with a transparent background?

I tried doing that with the "White text with alpha" preset, then returning just the sampled "pixel" with no channel checking and oddly enough I got the same result (white boxes). This is while I am rendering an alpha tested texture with the same depth and alpha test set.

Packing the characters in the 4 channels, permits storing 4 times as many characters in the same sized 32bit texture. This in turn translates to fewer texture swaps when rendering the font, thus improving the performance of application.

Of course, you can get similar results by increasing the texture size and then save it as an 8byte texture, but here you might encounter a size limit of the textures.

Still, this is all very theoretical. In most practical cases it will most likely not matter how you store your fonts.

In BMFont I try to give as many options as possible to allow the game developers to do what they feel is best for them.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement