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 have simple app that renders some particles and now I am trying to apply the bloom shader from the xna samplers ( ) to it, but I am running into this exception:

"XNA Framework HiDef profile requires TextureFilter to be Point when using texture format Vector4."

When the BloomComponent tries to end the sprite batch in the DrawFullscreenQuad method:

        spriteBatch.Begin(0, BlendState.Opaque, SamplerState.PointWrap, null, null, effect);
        spriteBatch.Draw(texture, new Rectangle(0, 0, width, height), Color.White);
        spriteBatch.End(); //<------- Exception thrown here

It seems to be related to the pixel shaders that I am using to animate the particle. In a nutshell, I have a texture2d in vector4 format that holds particle positions, and another one for velocities. Here is a snippet from that area:

        animationEffect.CurrentTechnique = animationEffect.Techniques[technique];

        spriteBatch.Draw(randomValues, new Rectangle(0, 0, width, height), Color.White);

What I comment out the code that calls the particle animation pixel shaders the bloom component runs fine. Is there some state that I need to reset to make the bloom work?

share|improve this question
up vote 0 down vote accepted

GraphicsDevice.SamplerStates[0] = SamplerState.PointWrap;

This will set the first SamplerState to PointWrap. Do this before you call your spriteBatch.Begin();.

share|improve this answer
Sadly, this does not help, I get still the same exception – Mr Bell Nov 18 '11 at 15:11
What should each of these states be set to? – Mr Bell Nov 18 '11 at 16:28
I checked the states of these before and after the spriteBatch.begin() and with my particle system turned on and off, and they are always the same. DepthStencilState = none, BlendSate = AlphaBlend, and RasterizerState = CullCounterClockwise – Mr Bell Nov 18 '11 at 18:48
I set the SamplerStates on element 1 instead of 0 and it works now. Thanks – Mr Bell Nov 18 '11 at 18:51

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.