/// <summary> /// Unloads the effects of this pipeline and the temporary RenderTargets, if you didn't pass them in the /// <see cref="Initialize" /> method.<br /> /// Please call this in the UnloadContent() method of your game. /// </summary> public void UnloadContent() { EmbeddedEffectsManager.UnloadContent(); if (!IsBloomRenderTarget1Passed) { BloomRenderTarget1?.Dispose(); } if (!IsBloomRenderTarget2Passed) { BloomRenderTarget2?.Dispose(); } }
/// <summary> /// Loads the effects of this pipeline.<br /> /// Please call this in the LoadContent() method of your game. /// </summary> /// <param name="graphicsDevice">The graphics device.</param> public void LoadContent(GraphicsDevice graphicsDevice) { ExtractEffect = EmbeddedEffectsManager.Load(graphicsDevice, "BloomExtract"); GaussianBlurEffect = EmbeddedEffectsManager.Load(graphicsDevice, "GaussianBlur"); CombineEffect = EmbeddedEffectsManager.Load(graphicsDevice, "BloomCombine"); }