Alpha Blend

Started by
5 comments, last by mse61 22 years, 5 months ago
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
++mse61--ICQ: 122419859AIM: mse6102
Advertisement
With 3D hardware which is specialised to do the job ?!

[via your preferred API]

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

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/
With best regards, Mirek Czerwiñski
I need to do 2d alpha blends using DX7.

Anybody know where i can find a list of the MMX instruction set?

~mse61
++mse61--ICQ: 122419859AIM: mse6102
developer.intel.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

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
Waramp.Before you insult a man, walk a mile in his shoes.That way, when you do insult him, you'll be a mile away, and you'll have his shoes.
There is also another alpha blending tutorial (with MMX) on gamedev. Check it now.

This topic is closed to new replies.

Advertisement