public override void StartPre(ICoreAPI api) { if (!(api is ICoreClientAPI)) { return; } SetConfigDefaults(); Instance = this; CApi = (ICoreClientAPI)api; Events = new Events(); Uniforms = new Uniforms(this); Debug = Environment.GetEnvironmentVariable("VOLUMETRICSHADING_DEBUG").ToBool(); if (Debug) { Mod.Logger.Event("Debugging activated"); } ShaderPatcher = new ShaderPatcher(CApi); ShaderInjector = new ShaderInjector(CApi, Mod.Info.ModID); VolumetricLighting = new VolumetricLighting(this); ScreenSpaceReflections = new ScreenSpaceReflections(this); OverexposureEffect = new OverexposureEffect(this); ScreenSpaceDirectionalOcclusion = new ScreenSpaceDirectionalOcclusion(this); ShadowTweaks = new ShadowTweaks(this); DeferredLighting = new DeferredLighting(this); UnderwaterTweaks = new UnderwaterTweaks(this); ShaderInjector.Debug = Debug; }
private void PatchGame() { Mod.Logger.Event("Loading harmony for patching..."); Harmony.DEBUG = Debug; _harmony = new Harmony("com.xxmicloxx.vsvolumetricshading"); _harmony.PatchAll(); var myOriginalMethods = _harmony.GetPatchedMethods(); foreach (var method in myOriginalMethods) { Mod.Logger.Event("Patched " + method.FullDescription()); } ShaderPatcher.Reload(); }