Hi,
First of all, I have been looking through the forums about hardware color blending (in pspsdk samples too, with no luck).
What I want to do is simple, I have a texture , and I want to render it with color blending onto the back buffer.
I use sceCopyImage to transfer the image to the backbuffer, but I allways get the final image without blend, I mean, the image that is supposed to be blended with the background overlaps the background. I use this code to set up the blending:
1)Context initialization
3)Image copy to back buffer
2)Blending function setup and enable blending state
sceGuBlendFunc(GU_ADD,GU_SRC_COLOR,ONE_MINUS_DST_COLOR,0,0)
sceGuEnable(GU_BLEND);
3) call to sceGuCopyImage() -> to copy texture over the BG Image with colorblend.
4) Disable blending
sceGuEnable(GU_BLEND);
I´m using 5650 color space.
Thanks in advance,
HexDump.
Hardware color blending.
Whilst I can't say for sure, but it sounds like he is correct (and this is indeed how it works on ps2)..
I would imagine a function sceGuCopyImage() would only copy an image.. ie blit it straight into vram. If you choose to copy it into a screen buffer then it's not suprising that there's no blending - it is a straight 'copy' operation and would bypass the actual pipeline that does blending and other effects.
I guess what you want it to sceGuCopyImage() it somwhere offscreen, then use a sprite (or some other primitive) to actually render it onto the display. That way you can get blending and things like that.
I would imagine a function sceGuCopyImage() would only copy an image.. ie blit it straight into vram. If you choose to copy it into a screen buffer then it's not suprising that there's no blending - it is a straight 'copy' operation and would bypass the actual pipeline that does blending and other effects.
I guess what you want it to sceGuCopyImage() it somwhere offscreen, then use a sprite (or some other primitive) to actually render it onto the display. That way you can get blending and things like that.
Damn, I need a decent signature!