Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was going to draw my shadow map into one channel of a 16 bit texture and then draw a different shadow map into another channel of the same texture.

I realized that this might not be possible to do efficiently since my targetted hardware (Xbox) does not support blending R16G16 formats. (Although the HDRBlendable might make it possible if I need a blendable format to do this.)

Is it possible to mask one channel of a R16G16 texture on the Xbox? How do I do that?

share|improve this question
up vote 3 down vote accepted

No you can't mask a R16G16 channel in XNA.

You can do it with a blendable format though, in my case, to use floating point the best you can do is to use HDRBlendable (R10G10B10A2 on the Xbox), and set ColorWriteChannels in the blendstate used appropriately, e.g.:

    myBlendState = new BlendState() 
        AlphaSourceBlend = Blend.One, 
        ColorSourceBlend = Blend.One, 
        AlphaDestinationBlend = Blend.Zero, 
        ColorDestinationBlend = Blend.Zero, 
        ColorWriteChannels = ColorWriteChannels.Red 
share|improve this answer
R10G10B10A10 = 40bpp? oO Isn't it more like R10G10B10A2? – Jonathan Connell Jun 8 '11 at 10:48
Yes, it is. Thanks :) – Olhovsky Jun 8 '11 at 12:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.