Page 1 of 2

alpha blending

PostPosted: Aug 18, 2004 @ 1:59am
by PringlesOriginal
how can i do alpha blending with pocketfrog(0.8)? I want to use the .raw files for masking....

anybody got any suggestion?

PostPosted: Aug 18, 2004 @ 7:22am
by Conan

PostPosted: Aug 18, 2004 @ 2:49pm
by fast_rx

PostPosted: Aug 18, 2004 @ 4:15pm
by jaguard

PostPosted: Aug 18, 2004 @ 4:52pm
by fast_rx

PostPosted: Aug 18, 2004 @ 5:13pm
by Kzinti

PostPosted: Aug 18, 2004 @ 6:33pm
by fast_rx
Do you feel that using a whole 16 byte per pixel surface as an alpha mask is acceptable? My code only uses the green value as the alpha...

It seemed the easiest to get what I wanted at the time.

I just came across an article at codeproject that is using the ARGB formatted images to have full alpha ( http://www.codeproject.com/useritems/Tr ... onDemo.asp ).
That would be nice to have, but since all of pocketfrog is 565 format surfaces, I assume it would be a lot of coding to support something like that.

PostPosted: Aug 18, 2004 @ 6:39pm
by Kzinti

PostPosted: Aug 19, 2004 @ 5:26am
by fast_rx
Ok... Since I needed to make the move to PF0.8 anyway, I went ahead and made the modifications. Here's a zip with the modified files, plus a demo app of how it can be used.

The one thing I probably could have done was to figure out how to write this in the algo2d.h file instead of repeating a lot of code. Also, there is just an empty function for the cases involving GenericRaster2D, since I don't know exactly what you'd do with that.

I also notice that the 'assert()' parts are missing. I assume they aren't needed and removed them from the additions as well.

Note: The img source and alpha source MUST be the same width, or you'll get strange things.

I also have written Additive and Subtractive blit functions as well that are good for explosions and things - and you don't have the slowdown of using a custom shader. I can also 'donate' these as well, but I thought I'd wait and hear what comments are made - especially with reguards to putting the stuff in algo2d.h


Maybe my name will be forever remembered in the pocketfrog source code like Frank Z's... :D

PostPosted: Aug 19, 2004 @ 5:50am
by fzammetti

PostPosted: Aug 19, 2004 @ 7:01am
by Conan

PostPosted: Aug 19, 2004 @ 8:15am
by jaguard

PostPosted: Aug 19, 2004 @ 8:41am
by jaguard

Feedback on Turbo Reaction

PostPosted: Aug 19, 2004 @ 2:06pm
by Conan
1. The red text is vey hard to read on my Dell Axim.
2. Fatal Application Error on exiting the game 2 times
3. The big icon is just 4 corners with not much else?
Plays nice & fast. Have not tried with sound/music yet as I'm at work.

PostPosted: Aug 19, 2004 @ 3:07pm
by fast_rx