Jump to content
  • Advertisement

Archived

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

Christoph

Alpha Blending again...

This topic is 5223 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

Hello, I''m creating anARGB-texture from a surface. At the same time I set the alpha value for every pixel. Using d3dDev.RenderState.DestinationBlend = Blend.InvSourceAlpha d3dDev.RenderState.SourceBlend = Blend.SourceAlpha I want to the texture to appear transparent. But it is either shown opaque or hidden completely. I found out that the texture is shown when I set every pixel to an alpha value higher than 127. For values <= 127, nothing is rendered at all. Do you know why DirectX doesn''t let me blend gradually? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
What bit depth are you using? if you use 16 bit (A1 R5 G5 B5), you only have 1 bit for alph blending, therefore it is either on or off. If you can, use 32 bit (A8 R8 G8 B8), that will give you 8 bits of alpha control, more than enough for most applications... I don't know if there is a 16 bit option that has more than 1 bit alpha (A4 R4 G4 B4?), worth a look though...

[edited by - Sr_Guapo on June 2, 2004 1:45:46 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!