 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
HexDump
Joined: 07 Jun 2005 Posts: 70
|
Posted: Sat Apr 22, 2006 9:16 pm Post subject: Blending revisited. |
|
|
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 |
|
 |
starman2049
Joined: 19 Sep 2005 Posts: 75
|
Posted: Sun Apr 23, 2006 7:43 am Post subject: |
|
|
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 |
|
 |
|
|
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
|