1 using Microsoft.Xna.Framework.Graphics;
9 internal static class GraphicsUtils
11 public static void BeginShaderBatch(
this SpriteBatch batch)
14 RasterizerState rasterizerState = Main.LocalPlayer.gravDir == 1f ? RasterizerState.CullCounterClockwise : RasterizerState.CullClockwise;
15 batch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, rasterizerState, null, Main.GameViewMatrix.TransformationMatrix);
18 public static void ResetBatch(
this SpriteBatch batch)
21 RasterizerState rasterizerState = Main.LocalPlayer.gravDir == 1f ? RasterizerState.CullCounterClockwise : RasterizerState.CullClockwise;
22 batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, rasterizerState, null, Main.GameViewMatrix.TransformationMatrix);