I am getting the following error, even though the code runs through the Draw could twice and then it errors:

XNA Framework HiDef profile does not support alpha blending or ColorWriteChannels when using rendertarget format Single.

The BlendState that I'm using is:

BlendState newBlendState = new BlendState()
    AlphaBlendFunction = BlendFunction.Add,
    AlphaSourceBlend = Blend.One,
    AlphaDestinationBlend = Blend.One,
    ColorBlendFunction = BlendFunction.Add,
    ColorSourceBlend = Blend.One,
    ColorDestinationBlend = Blend.One

I even set the SamplerStates to PointClamp before the actual draw is called:

device.DrawUserIndexedPrimitives<VertexPositionTexture>(PrimitiveType.TriangleList, domeVerts, 0, 1024, ib, 0, 1860);

I don't understand how it can run successfully twice, and then fail. Any help would be greatly appreciated.

A screenshot of the problem: Alpha Blending fail

  • \$\begingroup\$ Before you do any drawing I would suggest you reset the GraphicsDevice to its defaults. blogs.msdn.com/b/shawnhar/archive/2010/06/18/… \$\endgroup\$ Feb 29, 2012 at 18:22
  • 1
    \$\begingroup\$ "I don't understand how it can run successfully twice, and then fail." Do you use a spritebatch anywhere? Perhaps with a render target. \$\endgroup\$ Feb 29, 2012 at 18:43
  • \$\begingroup\$ There is a Debug render that uses a SpriteBatch. \$\endgroup\$ Feb 29, 2012 at 20:28
  • \$\begingroup\$ Are you using a RenderTarget2D anywhere? If so, can you post the code for the declaration of that? \$\endgroup\$
    – Nic Foster
    Feb 29, 2012 at 20:31
  • \$\begingroup\$ @Neil Knight try "GraphicsDevice.BlendState = BlendState.Opaque;" before "DrawUserIndexedPrimitives" then. \$\endgroup\$ Feb 29, 2012 at 20:56

2 Answers 2


The problem is that the RenderTargetFormat 'Single' does not have an alpha channel so you need to use a different format or an opaque blend state.

When I went to look up which values the RenderTargetFormat enum has I found out that someone else also asked this question in the official XNA forums, that they gave the same advice as I have and that this resolved the issue. I'm still posting this answer here so other people have a reference as well.


edit: thought it was the same person who asked this, but as ClassicThunder pointed out this is very unlikely.

  • 2
    \$\begingroup\$ The question was asked in 2010 and the latest post was close to a year ago so I doubt it was the same person. \$\endgroup\$ Feb 29, 2012 at 21:54
  • \$\begingroup\$ ClassicThunder: you're right, I didn't look at the date, but the question was so similar :) \$\endgroup\$
    – Roy T.
    Mar 1, 2012 at 8:02
  • \$\begingroup\$ The question you have posted in your answer is not me. I've tried using GraphicsDevice.BlendState = BlendState.Opaque but I want alpha blending. I've updated my question with a screenshot of the problem. \$\endgroup\$ Mar 1, 2012 at 8:48
  • \$\begingroup\$ You can't have alpha blending in a render target with format single, there is no alpha channel there. Single uses all the bits as one 32bit float instead of 4x8bits for colours as in RGBA modes so just change the render target declaration. \$\endgroup\$
    – Roy T.
    Mar 1, 2012 at 8:51
  • \$\begingroup\$ I have tried changing that, do you have a RenderTarget suggestion? \$\endgroup\$ Mar 1, 2012 at 9:24

The solution was nothing to do with the RenderTargets that were currently in use, but it was the DepthBuffer RenderTarget causing the problem. Changing this resolved the issue.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .