Even More Modifiers  1.0.0.0
A mod for rolling various bonus stats on items
GraphicsUtils.cs
Go to the documentation of this file.
1 using Microsoft.Xna.Framework.Graphics;
2 using Terraria;
3 
4 namespace Loot.Ext
5 {
9  internal static class GraphicsUtils
10  {
11  public static void BeginShaderBatch(this SpriteBatch batch)
12  {
13  batch.End();
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);
16  }
17 
18  public static void ResetBatch(this SpriteBatch batch)
19  {
20  batch.End();
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);
23  //Main.pixelShader.CurrentTechnique.Passes[0].Apply();
24  }
25  }
26 }