Direct Draw Alpha Blending Petition.
Microsoft include alpha blending in DirectX? That sort of implies a software implementation of alpha blending - If that's what you want, why not implement it yourself?
What we really need is alphablending supported by 2D hardware.
/NJ
(Anyone interrested in an alphablend "how-to" article?)
Check it out: http://www.gamedev.net/reference/programming/features/mmxblend
Josh
There's a simple optimization that further reduce the eq.:
result = ( ALPHA * ( srcPixel - destPixel ) ) / 256 + destPixel
Namely, multiplying the alpha channel on the source, and then inverting it, changing the equation
d=(1-a)*d+a*s
to
d=a*d+s
/NJ
It really isn't that hard, you know. Either use D3DX or roll your own. Either way, it's a much simpler solution than making a bunch of noise about something that will never get implemented in DDraw.
MSN
No API is perfect, and in this case rolling your own solution is far easier than petitioning to get the API changed. And besides, you learn about D3DIM if you do it yourself.
Doing alpha-blending really doesn't take that long; in fact, I think Tobias wrote an article that basically hands it to you on a plate.
Mason McCuskey
Spin Studios
www.spin-studios.com
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
I agree, Alpha Blending in DDraw is a *VERY* MUST! I don't blame the DX Team for getting us pissed, again though--after all, the ones to be BLAMED are the ppl who don't know what they're doing.
And, as a side note, I think that the Gamma Controls SHOULD be emulated if not available. :-)
Also, DX Team should talk to more developers if they want to make DX the standard--not that it already isn't. At the same time, I think they don't want to chat with every person who comes across with their own feature.
And, how about this you guys? DDraw merges with D3D! How about it?? Its after all a good logical thing to do! Then we could use all those 'neet' features from 3D hardware... :-)
- prauppl
Well, I see a few posts saying "Alpha blending is usually needed to be "customized" and stuff"
Well, I say this--why not have something like this:
typedef struct _DDALPHAPIXEL
{
int x, y;
unsigned char r, g, b, a;
} DDALPHAPIXEL;
DDALPHAPIXEL pix_map[64]; // 8x8 bitmap w/ alpha info
// fill out the pix_map
// draw the pixel map with ONE CALL to some
// function like DrawAlphaBlendedPixels()
// which basically is like the D3D DrawIndexedPrimitive(),
// which takes in indices to the array,
// the array of pixels with alpha and RGB info!
How about it? This way, we pass EVERYTHING once, speeding the program, *and* its easy plus customizable! What do you say??
- prauppl