🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Anti-Aliasing and Alpha Blending

Started by
0 comments, last by Angelus 24 years, 6 months ago
Hey there,

I have a slight problem with some Direct3D Retained-Mode programming. I realize that Immediate-Mode is so much better, but I just need to finish some unknown parts of Retained-Mode.

How exactly would I go about having a partially translucent Meshbuilder (or Mesh) object. Having Texture mapped that object, I'd like parts of the texture to be more translucent than others (so basically its an opacity map inside the texture). I've learned that I have to set the render mode :

device->SetRenderMode(D3DRMRENDERMODE_BLENDEDTRANSPARENCY | D3DRMRENDERMODE_SORTEDTRANSPARENCY );

and I can use a 32-bit texture (RGB-Alpha) and have the Alpha bits represent the opacity of each pixel. The only problem is that I can't save a BMP or PPM as a 32-bit texture. I would really appreciate some help in this area (I know I can set a global translucency for the whole mesh by setting the translucency in the material, but that's not what I want).

And another thing is that I would like to be able to use Anti-Aliasing on my textures, but i'm not at all sure how to go about that.

I would really appreciate some help in these fields (more so in the opacity area).

Thank you very much,

Advertisement
I have never used retained (icky) mode.. but I will give this a shot - if you are able to load in a TGA in retained mode (the D3DX utility library is able to do it, so maybe retained mode can too?) then you can specify an alpha channel (TGA's support alpha channels)... Another possibility is the DDS (?) format, er, not sure that's the right extension, but the format for compressed (S3TC) textures... which also support alpha (and there is a tool in the SDK which makes a S3TC file from two bmps I believe... one bmp is used for the alpha)...
Hope that is at least a little helpful..
Chaster

This topic is closed to new replies.

Advertisement