Jump to content

  • Log In with Google      Sign In   
  • Create Account

Trouble rendering to SurfaceFormat.Single


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 gchewood   Members   -  Reputation: 236

Like
0Likes
Like

Posted 29 March 2013 - 08:47 PM

This problem has been bugging me all day and I sense there's a really simple solution.

 

When trying to render my game's depth map I get the following error:

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

 

I've tried setting BlendState to Opaque and even setting ColorWriteChannels to None. Doesn't fix it.

 

This is all in my game which is based on the game state manager sample for xna: http://xbox.create.msdn.com/en-US/education/catalog/sample/game_state_management

 

If I run the exact same code in a completely blank project with the exact same model, it works just fine! So I assume the game state manager is changing some settings that are causing it to fail? What else is there that could be causing this? It's driving me insane.

 

Please help!!

Thanks



Sponsor:

#2 phil_t   Crossbones+   -  Reputation: 4094

Like
0Likes
Like

Posted 29 March 2013 - 09:08 PM

Well, I think you should leave ColorWriteChannels as the default.

 

You're sure you're using BlendState.Opaque for every single draw call you make when that render target is bound?

And you're not using any custom shaders that set alpha-blending in the shader file?



#3 gchewood   Members   -  Reputation: 236

Like
0Likes
Like

Posted 29 March 2013 - 10:46 PM

Ugh, false alarm. When I was setting ColorWriteChannels to none, that was completely resetting the blendstate by the looks of things. You're right, removing that line solved the problem. Thanks for the advice.

Can't believe that took me so long :-| One of those days!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS