dsn

Joined: 09 Nov 2005 Posts: 47 Location: Indianapolis, Indiana, USA
|
Posted: Sat Aug 12, 2006 11:57 am Post subject: [Solved] Colorizing a texture |
|
|
I'm playing around with bitmap fonts. So far I'm using the traditional method: one big image with all of the characters, drawing one quad for each letter. This works fine.
The problem I have is that I want to be able to set the font color on the fly, but without using a different image. I've tried using sceGuPixelMask with white character images, and I've tried using sceGuTexEnvColor with GU_TFX_BLEND. Both of these methods produce the same result: the color of the characters is indeed changed, but it's blended with the color behind the characters, which I don't want. I've also tried changing the ambient color but it has no effect, and I've dabbled with lighting but I don't understand it well enough to make it work. I suspect that using ambient lighting will be the best way to do this, but if so, I'll need some guidance on how to make it work. Any ideas/suggestions?
[Edit]
Figured it out. Black character images, GU_TFX_ADD with vertex colors does the trick. I will now accept my thirty lashings for not looking at samples/gu/cube before posting. :-) |
|