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; }
public override void Dispose() { if (CApi == null) { return; } ShadowTweaks.Dispose(); _harmony?.UnpatchAll(); Instance = null; }