Jump to content
  • Advertisement
Sign in to follow this  

Using an overlayed alpha map to clear pixels.

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

Hi, I've been struggling with this for a couple of hours. I'm basically drawing an empty texture with each pixel set to ARGB(0,0,0,0) over the top of another textured quad. I want to use the alpha channel of this clear texture to make sections of the textured quad become transparent, but I don't want the clear texture to be drawn at all obviously. I just can't figure out the RenderStates I need to make this happen as every one I try just draws the supposedly clear texture black with varying levels of opacity from the alpha channel. I'm currently setting the states like this but I've tried every combination I could think of.

m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);

Is this possible using RenderStates, etc, like that or am I going to have to use some other method? Thanks for any help. Cheers.

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!