public static void Load() { RTManager.Load(); GridRenderer = new GridRenderer(_gridEffect, GetTexture("Images/Noise"), Screen.Width, Screen.Height, RTManager.Width, RTManager.Height); CapRenderer = new CapRenderer(GetEffect("Effects/Texture")); InnerPixelRenderer = new InnerPixelRenderer(GetEffect("Effects/InnerPixel")); RTManager.ResolutionChanged += ResolutionChanged; }
public static void Unload() { GridRenderer?.Dispose(); CapRenderer?.Dispose(); InnerPixelRenderer?.Dispose(); GridRenderer = null; CapRenderer = null; InnerPixelRenderer = null; RTManager.ResolutionChanged -= ResolutionChanged; RTManager.Unload(); }