public override void Draw(GameTime gameTime) { //Draw Deferred Render Scene SetGBuffer(); m_camera.CameraDistance = 200; m_scene.DrawScene(m_camera, gameTime); ResolveGBuffer(); DrawLights(gameTime); //Draw 2D Scene m_basicEffect.Projection = m_camera.Projection; m_basicEffect.View = m_camera.View3D; m_basicEffect.World = Matrix.CreateScale(1, -1, 1) * Matrix.Identity; m_spriteBatch.Begin(0, BlendState.Opaque, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone, m_basicEffect); m_scene.Draw2DShit(m_spriteBatch); m_scene.WriteText(m_spriteBatch, GraphicsDevice, m_camera); m_scene.DrawParticles(m_camera, GraphicsDevice); m_spriteBatch.End(); //================================================= // Deferred Debugging Stuff //================================================= //int halfWidth = GraphicsDevice.Viewport.Width / 2; //int halfHeight = GraphicsDevice.Viewport.Height / 2; //m_spriteBatch.Begin(0, BlendState.Opaque, SamplerState.PointClamp, DepthStencilState.None, RasterizerState.CullNone); //m_spriteBatch.Draw(m_colourRT, new Rectangle(0, 0, halfWidth, halfHeight), Color.White); //m_spriteBatch.Draw(m_normalRT, new Rectangle(0, halfHeight, halfWidth, halfHeight), Color.White); //m_spriteBatch.Draw(m_lightRT, new Rectangle(halfWidth, 0, halfWidth, halfHeight), Color.White); //m_spriteBatch.End(); base.Draw(gameTime); }