Page 1 of 1

Opacity w/Transparency Map??

PostPosted: Mar 27, 2002 @ 5:22am
by capesdev
Is there any way to plot a surface with a global opacity AND a alpha level opacity ? In other words, I have a sprite that has an alpha map I use to call AlphaBltFast(). However, I want to plot that sprite at increasing levels of fading..to make a 'trail' effect. There seems to be no opacity flag for any of the AlphaBlt*() routines. Would I have to modify the alpha map prior to each call to make this effect?? If so... Johan, if you're reading this thread, pleeeeeaaaasssssse add the dwOpacity multiplier to your AlphaBlt() routines in a future release :)

Any suggestions ??
Thanks.

One solution

PostPosted: Mar 27, 2002 @ 5:51am
by capesdev
I figured I can make a copy of the alpha map and FillRect() it with black color at varying level to produce the effect...I think I'm losing cycles over just multiplying the alpha and dwOpacity values together tho.

PostPosted: Mar 27, 2002 @ 1:27pm
by Johan
Hi,

I'll add it to my list for 1.1... :)

Please note though that AlphaBlt is way slower than plain BltFast, since each non-masked pixel have to be multiplied six times (since you don't have the quick 50% opacity mode available).

/Johan

PostPosted: Mar 27, 2002 @ 4:06pm
by capesdev
Johan-
Thanks for the reply. I understand that AlphaBltFast() is slower than BltFast() but I do not know any other way to achieve the effect of per pixel alpha bledning. My game will not involve a large # of surfaces being blitted so I think I'll be ok using a lot of AlphaBltFast() calls. So far, your routines are proving more than fast enought :)

Regards,
Jeff.

PostPosted: Mar 27, 2002 @ 7:16pm
by billcow

PostPosted: Mar 27, 2002 @ 9:28pm
by Johan