This is my code.
RenderTexture front
= new RenderTexture
(Width, Height
); RenderTexture back
= new RenderTexture
(Width, Height
); Texture texture
= new Texture
(Width, Height
); texture
.Update (window
); back
.Draw (new Sprite
(texture
)); foreach (Effect effect
in ShaderManager
.ScreenShaders) { front
.Clear (); front
.Draw (new Sprite
(back
.Texture), effect
.Shader); front
.Display (); RenderTexture temp
= front
; front
= back
; back
= temp
; } back
.Display (); window
.Draw (new Sprite
(back
.Texture));Without it my fps is 120+ and with it it's 5. Why does this happen?
Also, would testing if a sprite's bounding box collides with the screen a quick way to test whether or not to draw it?