SpriteBatch overiding states and keeping them off ?

Has anyone else had any problems with spritebatch turning on culling and forcing it to stay on.

              if (turnOnSpriteBatchMsg) // weird spritebatch is torching the shadows with forced culling on all the draws.
                    BasicStuff.DrawBeginEnd(spriteBatch, font);  

After the red text goes off, the shadows are still hosed.

if i even use the spritebatch.drawstring it flips something on and when i turn it off my state settings still don’t apply.

Yes, SpriteBatch changes render state and does not restore it. Make sure you re-apply your render states after SpriteBatch Begin+End calls .

That’s just it everything is applied thruout but adding a spritebatch begin() … drawstring() … end()
turns on what appears to be the depth buffer to the opposite setting i have.

Even wrapping that in a if and then deactivating it so that even the begin end call is bypassed.
The setting if thats the state it flipped can’t be reversed.

As shown in the gif the shadows as soon as the text goes off the shadows should at least then be restore they aren’t ! it’s like a permanent internal state has been turned on.

After i hit spritebatch it reverses the depth from less then to greater then i think because the cubes behind others are cutting holes into the shadow.
Just prior to rending depth i set the state though explicitly.
but its just ignored i guess, arggg.

What is spritebatch doing to force the state to stay on even after i stop calling begin end ?

If this doesn’t undo it, right before i depth render… what will ?

GraphicsDevice.DepthStencilState = new DepthStencilState() { DepthBufferEnable = true, DepthBufferFunction = CompareFunction.LessEqual };

I have my own spritefont renderer if worse came to worse but its sub par compared to the already heavily optimized spritebatch.