Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 3667 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.

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!