Jump to content
  • Advertisement
Sign in to follow this  
Shadowflare

[DirectX/C++] Texture Alpha Problem

This topic is 3009 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 have a .X mesh of a tree, which uses a texture with an alpha channel for the branches and leaves. When rendered, the branches will appear transparent, as the alpha seems to get blended with other objects behind them, but if another branch is behind them, that other branch will not get blended, as shown in this screenshot: Alpha blending problem. As you can see, the Skybox gets rendered behind the branch in front with no problems, and the same is true for other objects (like the terrain) but the branch behind it gets chopped off. Does anyone know why this is happening? For the record, I have alpha blending enabled, and culling is turned off. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Typically with transparents you will render with z-testing enabled, but z-writes disabled. You'll also do some sort of rough back-to-front sort.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!