private void renderGameStuff(SpriteBatch sb) { AnimationLib.GraphicsDevice.SetRenderTarget(textureScreen); AnimationLib.renderSpineEntities(camera, entityList, cameraFocus, map, particleSet, acidSpitters); AnimationLib.GraphicsDevice.SetRenderTarget(null); screenResult = (Texture2D)textureScreen; AnimationLib.GraphicsDevice.SetRenderTarget(halfTextureScreen); AnimationLib.renderSpineEntities(camera * Matrix.CreateScale(0.5f), entityList, cameraFocus, map, particleSet, acidSpitters); AnimationLib.GraphicsDevice.SetRenderTarget(null); halfSizeTexture = (Texture2D)halfTextureScreen; AnimationLib.GraphicsDevice.SetRenderTarget(quarterTextureScreen); AnimationLib.renderSpineEntities(camera * Matrix.CreateScale(0.25f), entityList, cameraFocus, map, particleSet, acidSpitters); AnimationLib.GraphicsDevice.SetRenderTarget(null); quarterSizeTexture = (Texture2D)quarterTextureScreen; AnimationLib.GraphicsDevice.Clear(ClearOptions.Target | ClearOptions.DepthBuffer, Color.Transparent, 1.0f, 0); Game1.BloomFilter.Parameters["halfResMap"].SetValue(halfSizeTexture); Game1.BloomFilter.Parameters["quarterResMap"].SetValue(quarterSizeTexture); Game1.BloomFilter.Parameters["Threshold"].SetValue(0.7f); Game1.BloomFilter.Parameters["BlurDistanceX"].SetValue(0.0005f); Game1.BloomFilter.Parameters["BlurDistanceY"].SetValue(0.0005f); sb.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null, Game1.BloomFilter, Matrix.Identity); sb.Draw(screenResult, new Vector2(0), Color.White); sb.End(); sb.Begin(SpriteSortMode.Immediate, BlendState.NonPremultiplied, SamplerState.PointClamp, null, null, null, Matrix.Identity); gui.render(sb); if (messageQueueState == PushMessageQueueState.ShowMessage) { sb.DrawString(Game1.tenbyFive24, pushMessageQueue.Peek(), new Vector2(GlobalGameConstants.GameResolutionWidth / 2, 576) - Game1.tenbyFive24.MeasureString(pushMessageQueue.Peek()) / 2, Color.White); } else if (messageQueueState == PushMessageQueueState.FadeIn) { sb.DrawString(Game1.tenbyFive24, pushMessageQueue.Peek(), new Vector2(GlobalGameConstants.GameResolutionWidth / 2, 576) - Game1.tenbyFive24.MeasureString(pushMessageQueue.Peek()) / 2 - new Vector2(0, 50 * (1 - (queueTimer / 200))), Color.Lerp(Color.Transparent, Color.White, queueTimer / 200)); } else if (messageQueueState == PushMessageQueueState.FadeOut) { sb.DrawString(Game1.tenbyFive24, pushMessageQueue.Peek(), new Vector2(GlobalGameConstants.GameResolutionWidth / 2, 576) - Game1.tenbyFive24.MeasureString(pushMessageQueue.Peek()) / 2 + new Vector2(0, 50 * (queueTimer / 200)), Color.Lerp(Color.White, Color.Transparent, queueTimer / 200)); } #if DEBUG if (showStats) { sb.DrawString(Game1.tenbyFive14, "Allegiance: " + GameCampaign.PlayerAllegiance + "\nName: " + GameCampaign.PlayerName + "\nContract: " + GameCampaign.currentContract.type + "\nSeed: " + currentSeed + "\nContract Kills: " + GameCampaign.currentContract.killCount, Vector2.Zero, Color.LimeGreen); } #endif sb.End(); }