Alpha Blend
I need some info on advanced alpha blends. I have the basics like interpolation of the two colors. What is the fastest way to do it?
~mse61
mse:if you can, do it in asm using MMX instructions, they work pretty nice. The "fastest" way to do it in software is:
1.you start with a 32bit RGBA image
2.according to your alpha, you calculate the RGB values in your image
3.now as you alpha-blend your image you only need to multiply the destination RGB color values by 255-Alpha value and then add the source RGB values(which are already precalculated) to it.
That''s the fastest way I know to do it. Hope it helps
With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/
1.you start with a 32bit RGBA image
2.according to your alpha, you calculate the RGB values in your image
3.now as you alpha-blend your image you only need to multiply the destination RGB color values by 255-Alpha value and then add the source RGB values(which are already precalculated) to it.
That''s the fastest way I know to do it. Hope it helps
With best regards,
Mirek Czerwiñski
http://kris.top.pl/~kherin/
I need to do 2d alpha blends using DX7.
Anybody know where i can find a list of the MMX instruction set?
~mse61
Anybody know where i can find a list of the MMX instruction set?
~mse61
Doesn't the front page of this site (www.gamdev.net) have a link to fast alpha blending at this very moment?
Here it is:
http://www.gamedev.net/reference/programming/features/fastalpha/
Edited by - waramp on November 24, 2001 4:26:46 AM
Here it is:
http://www.gamedev.net/reference/programming/features/fastalpha/
Edited by - waramp on November 24, 2001 4:26:46 AM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement