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. :-)
[Solved] Colorizing a texture
You could also use paletted texture and just change the palette. Would be even faster at rendering.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl