For testing, I am rendering my image on quad (although I will split it up and batch the letters later). It is just a quad with a Vertex/Texture Coordinate signature. I am confused about two things for how it should be rendered.
1) Blending: From what I read, it should enable blending, and have D3D11_BLEND_SRC_ALPHA with D3D11_BLEND_INV_SRC_ALPHA. Although, I am not exactly aure. This is how I generate my blend state, is this the correct blend state?
D3D11_BLEND_DESC blendDesc; blendDesc.AlphaToCoverageEnable = false; blendDesc.IndependentBlendEnable = false; for (UINT i = 0; i < 8; ++i) { blendDesc.RenderTarget.BlendEnable = true; blendDesc.RenderTarget.BlendOp = D3D11_BLEND_OP_ADD; blendDesc.RenderTarget.BlendOpAlpha = D3D11_BLEND_OP_ADD; blendDesc.RenderTarget.DestBlend = D3D11_BLEND_INV_SRC_ALPHA; blendDesc.RenderTarget.DestBlendAlpha = D3D11_BLEND_ONE; blendDesc.RenderTarget.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; blendDesc.RenderTarget.SrcBlend = D3D11_BLEND_SRC_ALPHA; blendDesc.RenderTarget.SrcBlendAlpha = D3D11_BLEND_ONE; } HRESULT hResult = m_pD3D11Device->CreateBlendState(&blendDesc, &m_pAlphaBlendState);
2) Texture Filtering. I create a basic Linear, with Wrapping sampler state. Is this would I should be creating?
ID3D11SamplerState *pSamplerLinear; D3D11_SAMPLER_DESC sampDesc; ZeroMemory( &sampDesc, sizeof(sampDesc) ); sampDesc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR; sampDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP; sampDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP; sampDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP; sampDesc.ComparisonFunc = D3D11_COMPARISON_NEVER; sampDesc.MinLOD = 0; sampDesc.MaxLOD = D3D11_FLOAT32_MAX; HRESULT hResult = m_pD3D11Device->CreateSamplerState( &sampDesc, &pSamplerLinear );