# How do I configure the clipping region when drawing with XNA's SpriteBatch?

I have a SpriteBatch that is set to draw to a RenderTarget2D that is 500 pixels larger in both height and width. Whenever I draw to a point outside of the physical screen dimensions, it will not draw the object.

I am performing some 3D transforms on the texture so I need the areas outside the screen to be drawn. I have tried setting culling to None and this had no effect.

• Some code, please? – r2d2rigo Aug 14 '11 at 23:06
• If you're talking about the CullMode, that is the winding order of the polygons - it's not relevant. – Andrew Russell Aug 15 '11 at 1:40
• This question was cross-posted to Stack Overflow: stackoverflow.com/questions/7060033/… – Andrew Russell Aug 15 '11 at 1:41
• If your world/view/projection transforms put the entire sprite outside of the view frustum, it will get culled no matter what you do. – 3Dave Aug 15 '11 at 4:13
• Only thing I can think of is the Viewport is not large enough. Its supposed to default to the size of the current RenderTarget2D but check to make sure that it is. – ClassicThunder Nov 28 '11 at 23:34

Modify the Viewport on your GraphicsDevice before drawing to your RenderTarget2D.
GraphicsDevice.SetRenderTarget(myRenderTarget2D);