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


Anti-Aliasing and Alpha Blending

Recommended Posts

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 :


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,

Share this post

Link to post
Share on other sites
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..

Share this post

Link to post
Share on other sites