Пример #1
0
        private static void On_Terraria_Main_DrawProjectiles(On.Terraria.Main.orig_DrawProjectiles orig, Main self)
        {
            var matrix = PrimitiveTrailSystem.GetTransformMatrix();

            if (PrimitiveTrailSystem.AlphaBlendTrails.Count > 0)
            {
                Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
                {
                    foreach (var trail in PrimitiveTrailSystem.AlphaBlendTrails)
                    {
                        trail.Draw(Main.spriteBatch, matrix);
                    }
                }
                Main.spriteBatch.End();
            }

            if (PrimitiveTrailSystem.AdditiveBlendTrails.Count > 0)
            {
                Main.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive, Main.DefaultSamplerState, DepthStencilState.None, Main.instance.Rasterizer, null, Main.GameViewMatrix.TransformationMatrix);
                {
                    foreach (var trail in PrimitiveTrailSystem.AdditiveBlendTrails)
                    {
                        trail.Draw(Main.spriteBatch, matrix);
                    }
                }
                Main.spriteBatch.End();
            }

            orig(self);
        }
Пример #2
0
        private void DrawVerletBanners(On.Terraria.Main.orig_DrawProjectiles orig, Main self)
        {
            Filters.Scene["Outline"].GetShader().Shader.Parameters["resolution"].SetValue(new Vector2(Main.screenWidth, Main.screenHeight));
            Filters.Scene["Outline"].GetShader().Shader.Parameters["outlineColor"].SetValue(new Vector3(0, 0, 0));

            Main.spriteBatch.Begin(default, default, SamplerState.PointClamp, default, default, Filters.Scene["Outline"].GetShader().Shader, Main.GameViewMatrix.ZoomMatrix);
Пример #3
0
 private void DrawVerletBanners(On.Terraria.Main.orig_DrawProjectiles orig, Main self)
 {
     Main.spriteBatch.Begin(default, default, SamplerState.PointClamp, default, default, default, Main.GameViewMatrix.ZoomMatrix);
Пример #4
0
 private void Main_DrawProjectiles(On.Terraria.Main.orig_DrawProjectiles orig, Main self)
 {
     TrailManager.DrawTrails(Main.spriteBatch);
     orig(self);
 }
Пример #5
0
 private static void Main_DrawProjectiles(On.Terraria.Main.orig_DrawProjectiles orig, Main self)
 {
     SpiritMod.primitives.DrawTrailsProj(Main.spriteBatch);
     SpiritMod.TrailManager.DrawTrails(Main.spriteBatch);
     orig(self);
 }
Пример #6
0
 private void Main_DrawProjectiles(On.Terraria.Main.orig_DrawProjectiles orig, Main self)
 {
     orig(self);
     DrawTarget();
 }