#46362 - AkumaATR - Thu Jun 23, 2005 5:46 pm
Hey guys. I am trying to alpha blend bg2 (common starfield) (target layer) with some sprites (source layer) in Mode 4. Sprites are set up to be transparent. Also, further below I set:
REG_BLDMOD = 0x450;
//10001010000b
REG_COLEV = 0x808;
//100000001000b for 1/2 target color, 1/2 source color
I end up being able to see the stars throught the sprites (some sort of alpha blending is taking place, just doesn't appear to be right), but the stars are black dots. When they reemerge on the other side they go back to being white. The majority of the sprite doesn't get darker (as I want it to) as well -- I'm not sure if this is due to the same issue, or because first entry palette colors (black is behind the starfield and it's bg palette entry 0) are ignored in the alpha blend because first entry palette colors are deemded transparent by the hardware (I think this only applies to sprites... not sure yet... can anyone clarify?).
I am also wondering if alpha blending like that can even be accomplished in palettized modes -- my palettes are quite small -- I don't have palette colors defined for the resulting color that would come from an alpha blend -- is this an issue? I'm guessing it's not an issue since the result color is computed for each relative pixel for each frame... so it prob. doesn't need to have associated colors in the palette...
Thanks,
Jason
REG_BLDMOD = 0x450;
//10001010000b
REG_COLEV = 0x808;
//100000001000b for 1/2 target color, 1/2 source color
I end up being able to see the stars throught the sprites (some sort of alpha blending is taking place, just doesn't appear to be right), but the stars are black dots. When they reemerge on the other side they go back to being white. The majority of the sprite doesn't get darker (as I want it to) as well -- I'm not sure if this is due to the same issue, or because first entry palette colors (black is behind the starfield and it's bg palette entry 0) are ignored in the alpha blend because first entry palette colors are deemded transparent by the hardware (I think this only applies to sprites... not sure yet... can anyone clarify?).
I am also wondering if alpha blending like that can even be accomplished in palettized modes -- my palettes are quite small -- I don't have palette colors defined for the resulting color that would come from an alpha blend -- is this an issue? I'm guessing it's not an issue since the result color is computed for each relative pixel for each frame... so it prob. doesn't need to have associated colors in the palette...
Thanks,
Jason