Esempio n. 1
0
        private static void LoadHairDyes()
        {
            Ref <Effect> pixelShaderRef = Main.PixelShaderRef;

            DyeInitializer.LoadLegacyHairdyes();
            GameShaders.Hair.BindShader <HairShaderData>(3259, new HairShaderData(pixelShaderRef, "ArmorTwilight")).UseImage("Images/Misc/noise").UseColor(0.5f, 0.1f, 1f);
        }
Esempio n. 2
0
        private static void LoadMisc()
        {
            Ref <Effect> pixelShaderRef = Main.PixelShaderRef;

            GameShaders.Misc["ForceField"]            = new MiscShaderData(pixelShaderRef, "ForceField");
            GameShaders.Misc["WaterProcessor"]        = new MiscShaderData(pixelShaderRef, "WaterProcessor");
            GameShaders.Misc["WaterDistortionObject"] = new MiscShaderData(pixelShaderRef, "WaterDistortionObject");
            GameShaders.Misc["WaterDebugDraw"]        = new MiscShaderData(Main.ScreenShaderRef, "WaterDebugDraw");
            GameShaders.Misc["HallowBoss"]            = new MiscShaderData(pixelShaderRef, "HallowBoss");
            GameShaders.Misc["HallowBoss"].UseImage1("Images/Extra_" + (object)(short)156);
            GameShaders.Misc["QueenSlime"] = new MiscShaderData(pixelShaderRef, "QueenSlime");
            GameShaders.Misc["QueenSlime"].UseImage1("Images/Extra_" + (object)(short)180);
            GameShaders.Misc["QueenSlime"].UseImage2("Images/Extra_" + (object)(short)179);
            int type = 3530;

            bool[] flagArray = new bool[GameShaders.Armor.GetShaderIdFromItemId(type) + 1];
            for (int index = 0; index < flagArray.Length; ++index)
            {
                flagArray[index] = true;
            }
            foreach (int nonColorfulDyeItem in ItemID.Sets.NonColorfulDyeItems)
            {
                flagArray[GameShaders.Armor.GetShaderIdFromItemId(nonColorfulDyeItem)] = false;
            }
            ItemID.Sets.ColorfulDyeValues = flagArray;
            DyeInitializer.LoadMiscVertexShaders();
        }
Esempio n. 3
0
 private static void LoadBasicColorDye(
     int baseDyeItem,
     float r,
     float g,
     float b,
     float saturation = 1f,
     int oldShader    = 1)
 {
     DyeInitializer.LoadBasicColorDye(baseDyeItem, baseDyeItem + 12, baseDyeItem + 31, baseDyeItem + 44, r, g, b, saturation, oldShader);
 }
Esempio n. 4
0
 private static void LoadBasicColorDyes()
 {
     DyeInitializer.LoadBasicColorDye(1007, 1f, 0.0f, 0.0f, 1.2f, 1);
     DyeInitializer.LoadBasicColorDye(1008, 1f, 0.5f, 0.0f, 1.2f, 2);
     DyeInitializer.LoadBasicColorDye(1009, 1f, 1f, 0.0f, 1.2f, 3);
     DyeInitializer.LoadBasicColorDye(1010, 0.5f, 1f, 0.0f, 1.2f, 4);
     DyeInitializer.LoadBasicColorDye(1011, 0.0f, 1f, 0.0f, 1.2f, 5);
     DyeInitializer.LoadBasicColorDye(1012, 0.0f, 1f, 0.5f, 1.2f, 6);
     DyeInitializer.LoadBasicColorDye(1013, 0.0f, 1f, 1f, 1.2f, 7);
     DyeInitializer.LoadBasicColorDye(1014, 0.2f, 0.5f, 1f, 1.2f, 8);
     DyeInitializer.LoadBasicColorDye(1015, 0.0f, 0.0f, 1f, 1.2f, 9);
     DyeInitializer.LoadBasicColorDye(1016, 0.5f, 0.0f, 1f, 1.2f, 10);
     DyeInitializer.LoadBasicColorDye(1017, 1f, 0.0f, 1f, 1.2f, 11);
     DyeInitializer.LoadBasicColorDye(1018, 1f, 0.1f, 0.5f, 1.3f, 12);
     DyeInitializer.LoadBasicColorDye(2874, 2875, 2876, 2877, 0.4f, 0.2f, 0.0f, 1f, 1);
 }
Esempio n. 5
0
        private static void LoadArmorDyes()
        {
            Ref <Effect> pixelShaderRef = Main.PixelShaderRef;

            DyeInitializer.LoadBasicColorDyes();
            GameShaders.Armor.BindShader <ArmorShaderData>(1050, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(0.6f, 0.6f, 0.6f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1037, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(1f, 1f, 1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3558, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(1.5f, 1.5f, 1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2871, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessColored")).UseColor(0.05f, 0.05f, 0.05f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3559, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlack")).UseColor(1f, 1f, 1f).UseSaturation(1.2f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1031, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.2f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1032, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlackGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3550, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrimGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1063, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessGradient")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1035, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f).UseSaturation(1.2f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1036, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlackGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3552, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrimGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1065, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessGradient")).UseColor(0.0f, 0.0f, 1f).UseSecondaryColor(0.0f, 1f, 1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1033, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.2f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1034, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndBlackGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3551, new ArmorShaderData(pixelShaderRef, "ArmorColoredAndSilverTrimGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1064, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessGradient")).UseColor(0.0f, 1f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1068, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.5f, 1f, 0.0f).UseSecondaryColor(1f, 0.5f, 0.0f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1069, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(0.0f, 1f, 0.5f).UseSecondaryColor(0.0f, 0.5f, 1f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1070, new ArmorShaderData(pixelShaderRef, "ArmorColoredGradient")).UseColor(1f, 0.0f, 0.5f).UseSecondaryColor(0.5f, 0.0f, 1f).UseSaturation(1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(1066, new ArmorShaderData(pixelShaderRef, "ArmorColoredRainbow"));
            GameShaders.Armor.BindShader <ArmorShaderData>(1067, new ArmorShaderData(pixelShaderRef, "ArmorBrightnessRainbow"));
            GameShaders.Armor.BindShader <ArmorShaderData>(3556, new ArmorShaderData(pixelShaderRef, "ArmorMidnightRainbow"));
            GameShaders.Armor.BindShader <ArmorShaderData>(2869, new ArmorShaderData(pixelShaderRef, "ArmorLivingFlame")).UseColor(1f, 0.9f, 0.0f).UseSecondaryColor(1f, 0.2f, 0.0f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2870, new ArmorShaderData(pixelShaderRef, "ArmorLivingRainbow"));
            GameShaders.Armor.BindShader <ArmorShaderData>(2873, new ArmorShaderData(pixelShaderRef, "ArmorLivingOcean"));
            GameShaders.Armor.BindShader <ReflectiveArmorShaderData>(3026, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(1f, 1f, 1f);
            GameShaders.Armor.BindShader <ReflectiveArmorShaderData>(3027, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(1.5f, 1.2f, 0.5f);
            GameShaders.Armor.BindShader <ReflectiveArmorShaderData>(3553, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(1.35f, 0.7f, 0.4f);
            GameShaders.Armor.BindShader <ReflectiveArmorShaderData>(3554, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(0.25f, 0.0f, 0.7f);
            GameShaders.Armor.BindShader <ReflectiveArmorShaderData>(3555, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflectiveColor")).UseColor(0.4f, 0.4f, 0.4f);
            GameShaders.Armor.BindShader <ReflectiveArmorShaderData>(3190, new ReflectiveArmorShaderData(pixelShaderRef, "ArmorReflective"));
            GameShaders.Armor.BindShader <TeamArmorShaderData>(1969, new TeamArmorShaderData(pixelShaderRef, "ArmorColored"));
            GameShaders.Armor.BindShader <ArmorShaderData>(2864, new ArmorShaderData(pixelShaderRef, "ArmorMartian")).UseColor(0.0f, 2f, 3f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2872, new ArmorShaderData(pixelShaderRef, "ArmorInvert"));
            GameShaders.Armor.BindShader <ArmorShaderData>(2878, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(0.7f, 1f, 0.9f).UseSecondaryColor(0.35f, 0.85f, 0.8f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2879, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(1f, 1.2f, 0.0f).UseSecondaryColor(1f, 0.6f, 0.3f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2885, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(1.2f, 0.8f, 0.0f).UseSecondaryColor(0.8f, 0.2f, 0.0f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2884, new ArmorShaderData(pixelShaderRef, "ArmorWisp")).UseColor(1f, 0.0f, 1f).UseSecondaryColor(1f, 0.3f, 0.6f);
            GameShaders.Armor.BindShader <ArmorShaderData>(2883, new ArmorShaderData(pixelShaderRef, "ArmorHighContrastGlow")).UseColor(0.0f, 1f, 0.0f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3025, new ArmorShaderData(pixelShaderRef, "ArmorFlow")).UseColor(1f, 0.5f, 1f).UseSecondaryColor(0.6f, 0.1f, 1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3039, new ArmorShaderData(pixelShaderRef, "ArmorTwilight")).UseImage("Images/Misc/noise").UseColor(0.5f, 0.1f, 1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3040, new ArmorShaderData(pixelShaderRef, "ArmorAcid")).UseColor(0.5f, 1f, 0.3f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3041, new ArmorShaderData(pixelShaderRef, "ArmorMushroom")).UseColor(0.05f, 0.2f, 1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3042, new ArmorShaderData(pixelShaderRef, "ArmorPhase")).UseImage("Images/Misc/noise").UseColor(0.4f, 0.2f, 1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3560, new ArmorShaderData(pixelShaderRef, "ArmorAcid")).UseColor(0.9f, 0.2f, 0.2f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3561, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(0.4f, 0.7f, 1.4f).UseSecondaryColor(0.0f, 0.0f, 0.1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3562, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(1.4f, 0.75f, 1f).UseSecondaryColor(0.45f, 0.1f, 0.3f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3024, new ArmorShaderData(pixelShaderRef, "ArmorGel")).UseImage("Images/Misc/noise").UseColor(-0.5f, -1f, 0.0f).UseSecondaryColor(1.5f, 1f, 2.2f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3534, new ArmorShaderData(pixelShaderRef, "ArmorMirage"));
            GameShaders.Armor.BindShader <ArmorShaderData>(3028, new ArmorShaderData(pixelShaderRef, "ArmorAcid")).UseColor(0.5f, 0.7f, 1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3557, new ArmorShaderData(pixelShaderRef, "ArmorPolarized"));
            GameShaders.Armor.BindShader <ArmorShaderData>(3038, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(0.5f, 0.7f, 1.3f).UseSecondaryColor(0.5f, 0.7f, 1.3f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3600, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(0.7f, 0.4f, 1.5f).UseSecondaryColor(0.7f, 0.4f, 1.5f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3597, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(1.5f, 0.6f, 0.4f).UseSecondaryColor(1.5f, 0.6f, 0.4f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3598, new ArmorShaderData(pixelShaderRef, "ArmorHades")).UseColor(0.1f, 0.1f, 0.1f).UseSecondaryColor(0.4f, 0.05f, 0.025f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3599, new ArmorShaderData(pixelShaderRef, "ArmorLoki")).UseColor(0.1f, 0.1f, 0.1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3533, new ArmorShaderData(pixelShaderRef, "ArmorShiftingSands")).UseImage("Images/Misc/noise").UseColor(1.1f, 1f, 0.5f).UseSecondaryColor(0.7f, 0.5f, 0.3f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3535, new ArmorShaderData(pixelShaderRef, "ArmorShiftingPearlsands")).UseImage("Images/Misc/noise").UseColor(1.1f, 0.8f, 0.9f).UseSecondaryColor(0.35f, 0.25f, 0.44f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3526, new ArmorShaderData(pixelShaderRef, "ArmorSolar")).UseColor(1f, 0.0f, 0.0f).UseSecondaryColor(1f, 1f, 0.0f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3527, new ArmorShaderData(pixelShaderRef, "ArmorNebula")).UseImage("Images/Misc/noise").UseColor(1f, 0.0f, 1f).UseSecondaryColor(1f, 1f, 1f).UseSaturation(1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3528, new ArmorShaderData(pixelShaderRef, "ArmorVortex")).UseImage("Images/Misc/noise").UseColor(0.1f, 0.5f, 0.35f).UseSecondaryColor(1f, 1f, 1f).UseSaturation(1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3529, new ArmorShaderData(pixelShaderRef, "ArmorStardust")).UseImage("Images/Misc/noise").UseColor(0.4f, 0.6f, 1f).UseSecondaryColor(1f, 1f, 1f).UseSaturation(1f);
            GameShaders.Armor.BindShader <ArmorShaderData>(3530, new ArmorShaderData(pixelShaderRef, "ArmorVoid"));
            DyeInitializer.FixRecipes();
        }
Esempio n. 6
0
 public static void Load()
 {
     DyeInitializer.LoadArmorDyes();
     DyeInitializer.LoadHairDyes();
     DyeInitializer.LoadMisc();
 }