Advertisement

Direct Draw Alpha Blending Petition.

Started by October 11, 1999 12:46 AM
14 comments, last by evaclear 25 years, 1 month ago
yup, me in
Hell, yes..

------------------
Drago

osu!
Advertisement
Before you go through too much trouble, consider what you are asking:

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?)

<b>/NJ</b>
Actually, there's already a really good alpha blending article on gamedev.net.

Check it out: http://www.gamedev.net/reference/programming/features/mmxblend

Josh

One quick comment to that:

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

<b>/NJ</b>
If you're really stuck up on using 2d alpha blits, just use 3d sprites for God's sake.

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

Advertisement
I agree with msn & Mike.

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

Founder, Cuttlefish Industries
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

- 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

- prauppl
Well the point isn't if I can use Direct 3d to do alpha blending (quite frankly because not everyone has a 3d accelerator). And I suppose the solution would have to be SOFTWARE ACCELERATED at first. But with the Direct X History I've seen, hardware manufacturers are quick to add support for new features in Direct X. (EMBM & Cubic Bumpmapping are just some examples). The point is we were promised something that the company didn't pull through on. Not only is it a dissapointment, it also makes me wonder if they will ever pull through on other things that are promised for new direct X releases.
Joseph FernaldSoftware EngineerRed Storm Entertainment.------------------------The opinions expressed are that of the person postingand not that of Red Storm Entertainment.

This topic is closed to new replies.

Advertisement