Jump to content
  • Advertisement


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


direct3d 8 alpha testing

This topic is 6106 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, has anybody had any success with d3d8''s alpha testing? i''m trying to perform the same thing as color keying in directdraw, except using alpha testing and IDirect3DTexture8 objects. i set the alpha ref value to 0, set the compare function to greater, and enable aplha testing. i set all black pixels alpha values to 0xff and non black to 0. yet, all pixels are always drawn. m$ give this code in the d3d8 sdk: // This code example assumes that pCaps is a // D3DCAPS8 structure that was filled with a // previous call to IDirect3D8::GetDeviceCaps. if (pCaps.AlphaCmpCaps & D3DPCMPCAPS_GREATEREQUAL) { dev->SetRenderState(D3DRS_ALPHAREF, (DWORD)0x00000001); dev->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE); dev->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); } which i based my code off. and yep, my card does support alpha testing. so has anyone out there got alpha testing to work in d3d8? i got it working in opengl, and would like to do the same thing with d3d8

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!