Sign in to follow this  

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this