Jump to content
  • Advertisement
Sign in to follow this  

Standard Alpha Blending in DirectX 10 (DX9 logic may still apply.)

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

Well I'm not sure how to set this up so it does basic blending it which the two objects are blended based on there alpha and not there colors. This is the closest I've come from trying random things: ID3D10BlendState* BlendState = NULL; D3D10_BLEND_DESC BlendStateDesc; ZeroMemory(&BlendStateDesc, sizeof(D3D10_BLEND_DESC)); BlendStateDesc.AlphaToCoverageEnable = false; BlendStateDesc.BlendEnable[0] = true; BlendStateDesc.SrcBlend = D3D10_BLEND_SRC_ALPHA; BlendStateDesc.DestBlend = D3D10_BLEND_ONE; BlendStateDesc.BlendOp = D3D10_BLEND_OP_ADD; BlendStateDesc.SrcBlendAlpha = D3D10_BLEND_ZERO; BlendStateDesc.DestBlendAlpha = D3D10_BLEND_ZERO; BlendStateDesc.BlendOpAlpha = D3D10_BLEND_OP_ADD; BlendStateDesc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_ALL; g_d3dDevice->CreateBlendState(&BlendStateDesc, &BlendState); g_d3dDevice->OMSetBlendState(BlendState, D3DXCOLOR( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF); But it is adding the color to the destination and I want it to blend it by just the alpha and not the color.

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!