Page 1 of 1

Some alpha blend thoughts

PostPosted: May 13, 2002 @ 4:53pm
by Johan
UPDATED 2002-05-22

<<Lots of stupid blabbering from me removed>>

Ok. In this post I was describing how I tried to use floating points for alphablends. It was so stupid I had to remove it.

I am currently doing a major internal overhaul of GapiDraw. All Alphablends are currently performance improved by more than 103%. In cases where constant opacity is used in combination with AlphaBlt the speed improvement is even bigger (>200%).

I am rewriting lots of the logic used for color masks and surface shifts as well, resulting in an overall performance increase.

Thanks to all who replied to this post below. The gamedev article was really interesting!

/Johan

PostPosted: May 14, 2002 @ 7:46am
by Hosed
That's the same results I found with my own alpha blend code. However, did you try fixed point arithmetic on the iPAQ? I've found floating point arithmetic to be slower by over a factor of 10 on most of the PPC devices. I haven't tested the numbers on ARM procs yet however.

.. see article on gamedev.net

PostPosted: May 19, 2002 @ 11:30pm
by execom
floating point are emulated on wince, they must be banned

See
http://www.gamedev.net/reference/articl ... cle817.asp

for an interesting 16bit alpha blending implementation.

A method with 4Kb multiplication table exists too (the one I use)

PostPosted: May 22, 2002 @ 7:51pm
by Johan
Ok. I guess I have to blaim my floating point discussion to the weather (we're not used to sunshine here, at least not I).

I've updated my post, and am currently performance tuning different combinations of alpha blends operations. Current speed improvement is 105%, but I guess this will improve over the next couple of days.

/Johan

PostPosted: May 23, 2002 @ 12:26pm
by Johan
Well. Just in case anyone still reads this thread: Alpha blends are now improved by more than 250%! This means that an alpha blend that previously took 10 ms to execute now only takes (10ms/(1 + 2.50)) = 2,86 ms. In practice, this means that you can do three alpha blends in the time it previously took to only do one.

The performance increase is not only due to improving the alpha blend routines, but a result of a general improvement to the entire GapiDraw core. Every single operation is being worked on thoroughly, with large amounts of code expansion where needed.

PostPosted: May 24, 2002 @ 2:49am
by Hosed