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 

Blending revisited.

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



Joined: 07 Jun 2005
Posts: 70

PostPosted: Sat Apr 22, 2006 9:16 pm    Post subject: Blending revisited. Reply with quote

Hi,

After playing about 1 hour (1 more) with the sceBlendingFunction without getting the results I like, I have decided to post again about blending.

What I would like to get is something like Cs * Alfa + Cd * (1-Alfa), easy....

My Pixel Buffer is 565, and the image I want to blend with the pixel buffer 565 too now. I have thing about converting de 565 to 4444 and use alfa in my vertexes, Is this what everyone would do in this case?.

P.D. With the srcfix and dstfix parameters of blend function I got some kind of blending but colors where screwed, so this is not enough for me.

Thanks in advance,
HexDump.
Back to top
View user's profile Send private message
starman2049



Joined: 19 Sep 2005
Posts: 75

PostPosted: Sun Apr 23, 2006 7:43 am    Post subject: Reply with quote

Here's what I do, don't know if this will help you or not:

On init:
Code:
   sceGuBlendFunc(GU_ADD, GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA, 0, 0);
   sceGuEnable(GU_BLEND);


When I set the texture, I set my modulation accordingly:
Code:
if (pMaterial->has_alpha)
   sceGuTexFunc(GU_TFX_MODULATE,GU_TCC_RGBA);
else
   sceGuTexFunc(GU_TFX_MODULATE,GU_TCC_RGB);


For vertices: alpha value of 0==completly translucent, and 255==completly opaque[/code]
Back to top
View user's profile Send private message
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