public override void Unload() { //Reset the shader listings to the vanilla state. ShaderReflections.SetShaderList(vanillaShaders); ShaderReflections.SetShaderBindings(vanillaBindings); ShaderReflections.SetShaderCount(vanillaShaders.Count); instance = null; shaderRef = null; ShaderLoader.Unload(); }
public override void Load() { Logger.InfoFormat("{0}: ", Name); shaderRef = new Ref <Effect>(Main.pixelShader); //Save the state of the vanilla shader listings. vanillaShaders = new List <ArmorShaderData>(ShaderReflections.GetShaderList()); vanillaBindings = new Dictionary <int, int>(ShaderReflections.GetShaderBindings()); ShaderLoader.RegisterMod(this); instance = this; }