In dx9, the blend state was fairly simple. In dx11, it's a lot more complicated and I'm having trouble understanding how I need to have it set. I have a small app that is supposed to draw several instances of tessellated bezier triangles, and even though I have the pixel shader set to just paint one color, I'm not seeing that color on my screen at all. I've looked at my app with PIX (I use VS 2012 Express so it's my only debugging option for now.) and my vertex buffers seem to be doing what they are supposed to.
Right now I'm wondering about the blend state because I don't fully understand it. Here is how I have it set in my render method:
RenderTargetBlendDescription rendBlendDesc = new RenderTargetBlendDescription(); rendBlendDesc.SourceAlphaBlend = BlendOption.One; rendBlendDesc.DestinationAlphaBlend = BlendOption.Zero; rendBlendDesc.BlendOperation = BlendOperation.Add; rendBlendDesc.SourceBlend = BlendOption.One; rendBlendDesc.DestinationBlend = BlendOption.Zero; BlendStateDescription blendDesc = new BlendStateDescription(); blendDesc.AlphaToCoverageEnable = false; blendDesc.IndependentBlendEnable = false; blendDesc.RenderTarget = rendBlendDesc; BlendState blendState = new BlendState(Game.GraphicsDevice, blendDesc); Game.GraphicsDevice.ImmediateContext.OutputMerger.SetBlendState(blendState);
Do you see anything here that would prevent drawing from being visible?