forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved] Colorizing a texture

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
dsn



Joined: 09 Nov 2005
Posts: 47
Location: Indianapolis, Indiana, USA

PostPosted: Sat Aug 12, 2006 11:57 am    Post subject: [Solved] Colorizing a texture Reply with quote

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. :-)
Back to top
View user's profile Send private message Send e-mail
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Sat Aug 12, 2006 6:59 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group