So, I don't think I understood the sceGuBlendFunc function. How would I go about setting the following modes?
- (Source + Dest) / 2
- Source / 4 + Dest
Basically I want to know how to multiply one or both of the colors by some value. Currently I can only do 1A + 1B or 1A - 1B :P
Blending...
Blending...
Let's see what the PSP reserves... well, I'd say anything is better than Palm OS.
You use alpha. In the first case you should use: GU_SRC_ALPHA, GU_ONE_MINUS_SRC_ALPHA and source alpha value of 128. In the second case use GU_SRC_ALPHA, GU_ONE and source alpha of 64. If you are using texture as source color you may want to modulate the color coming from texture with a white color with alpha set to the value you want.
If it's a fixed value, you don't need to use alpha, you can use GU_FIX constants. Example:
Code: Select all
// (Source+Dest)/2 or Source * 0.5 + Dest * 0.5
sceGuBlendFunc(GU_ADD,GU_FIX,GU_FIX,GU_COLOR(0.5f,0.5f,0.5f,0),GU_COLOR(0.5f,0.5f,0.5f,0));
Code: Select all
// Source / 4 + Dest or Source * 0.25 + Dest
sceGuBlendFunc(GU_ADD,GU_FIX,GU_FIX,GU_COLOR(0.25f,0.25f,0.25f,0),GU_COLOR(1,1,1,0));
GE Dominator