dest alpha

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
lukas
Posts: 2
Joined: Sat Dec 26, 2009 6:52 am

dest alpha

Post by lukas »

has anybody tried using dest alpha? it seems it doesnt work for me neither when i'm trying to blend nor when i do a screenshot ( its all set to 0 even if i clear with 0xff). maybe i'm missing some state?
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

PSP does not support destination alpha. The framebuffer alpha channel is used as stencil buffer bits.
You can however use the clear enable bit to write to destination alpha at least through the primitives vertex color (as is done in sceGuClear to "clear" the stencil bits).

Code: Select all

sceGuSendCommandi&#40;211, GU_STENCIL_BUFFER_BIT<<8|0x1&#41;;
sceGuDrawArray&#40;....&#41;;
sceGuSendCommandi&#40;211, 0&#41;;
This will render the vertex colors alpha component into the destination stencil/alpha bits (iirc even with the interpolation done by smooth shading). However, this unfortunately still doesn't render texture alpha component.
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki

Alexander Berl
lukas
Posts: 2
Joined: Sat Dec 26, 2009 6:52 am

Post by lukas »

all alpha related stuff appears to be sooo broken on psp. no possibility to sum vertex and texture alpha, no dest blending. that's frustrating. thanks for quick reply though
Post Reply