I have a very subtle problem with XNA, specifically the SpriteBatch. In my game I have a Camera class. It can Translate the view (obviously) and also zoom in and out. I apply the Camera to the scene when I call the "Begin" function of my spritebatch instance (the last parameter).
The Problem: When the cameras Zoomfactor is bigger than 1.0f, the spritebatch stops drawing. I tried to debug my scene but I couldn't find the point where it goes wrong.
I tried to just render with "Matrix.CreateScale(2.0f);" as the last parameter for "Begin". All other parameters were null and the first "SpriteSortMode.Immediate", so no custom shader or something. But SpriteBatch still didn't want to draw.
Then I tried to only call "DrawString" and DrawString worked flawlessly with the provided scale (2.0f).
However, through a lot of trial and error, I found out that also multiplying the ScaleMatrix with "Matrix.CreateTranslation(0, 0, -1)" somehow changed the "safe" value to 1.1f. So all Scale values up to 1.1f worked. For everything above SpriteBatch does not render a single pixel in normal "Draw" calls. (DrawString still unaffected and working).
Why is this happening? I did not setup any viewport or other matrices. It appears to me that this could be some kind of strange Near/Farclipping. But I usually only know those parameters from 3d stuff.
If anything is unclear please ask!