Jump to content
  • Advertisement
Sign in to follow this  
of_ownage

D3DFMT_A32B32G32R32F alpha testing

This topic is 3793 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, is there any secret about alpha testing with that format: D3DFMT_A32B32G32R32F? when i use D3DFMT_X8R8G8B8 for my render target and do alpha blending for e.g. trees like this:: g_Device->SetRenderState(D3DRS_ALPHATESTENABLE, true); g_Device->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); g_Device->SetRenderState(D3DRS_ALPHAREF, 1); everything works perfect. But if i use the D3DFMT_A32B32G32R32F the whole texture gets rendered also the black borders. Anybody has a idea? :S

Share this post


Link to post
Share on other sites
Advertisement
Only newer GPU's (Nvidia 8-series and higher, ATI HD 2000-series and higher) support alpha-blending and alpha-testing with fp32. You should check for support at runtime by calling IDirect3D9::CheckDeviceFormat and specifying D3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING as the Usage parameter (along with D3DFMT_A32B32G32R32F as the format to be checked).

If you just want to know if the GPU in your test PC can do it, use the D3D Caps viewer.

Share this post


Link to post
Share on other sites
Don't forget you can call TEXKIL in your pixel shader to emulate alpha testing (plus you don't have to necessarily "waste" the alpha value in this way which can be even better).

LeGreg

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!