Archived

This topic is now archived and is closed to further replies.

Alphablending

This topic is 6387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I can't succeed when I'm trying to use Alphablending in directx... I want the texture to be transparent in som parts and not in other parts, defined by a grayscale image. (I think you know what I mean) I'm using direct3d in directx7... Anyone who can help me?? Edited by - Pellebert on 6/16/00 6:36:30 AM

Share this post


Link to post
Share on other sites
Not to be much of help, but I have the same problem
I''ve managed to make all the parts that are exactly black (0,0,0) or white (255,255,255), but the color values near these (e.g. (0,1,2)) aren''t transculent which they should be.

Share this post


Link to post
Share on other sites
Alphablnd need many things :
-hardware support
-texture with alpha channel or material...
-the renderstate alphablend enable.
-the renderstate srcblend, destblend (if allowed by hw!!!!!)

May be, you want to use colorkey wich is more easy a supported....



-eng3d.softhome.net-

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''ve been doing nothing but trying to figure this out myself for days. Here are my conclusions --

Use Direct3D or else you''re going nowhere. You''ll have to enumerate devices and do a bunch of other stuff, BUT IT''S WORTH IT.

Use DXTEX (DX texture tool) and load in your alpha channel, and save as a DDS. Load directly into a texture in your project and you''re good to go. DXT3 seems to be the best format, from what I can tell...

Given just moderately good hardware, your alpha blended, zoomed, and rotated blits will be VERY fast. Just for reference, I''m getting about 60fps blitting 50+ alpha sprites on a PII-400 with a Permedia 2 (fairly lame) 3D card. Don''t try to do it with DirectDraw only or you will be frustrated!!

Share this post


Link to post
Share on other sites
Check out NukeDX, it has great alpha blending routines. They work very quickly.

If you are considering Direct3D, I suggest taking a look at D3DX, the Direct3D extensions added in 7.0, specifically the sprite drawing functions - VERY cool.

Clay

Share this post


Link to post
Share on other sites