Post processing class which can be used to create a bloom (glow) effect.
Inheritance: PostProcessingEffectBase
Exemple #1
0
        public void InitializeEffects()
        {
            // Create the render target set
            //mRenderTargets = new Dictionary<SurfaceFormat, RenderTargetPair>();

            // Load all effects
            mBloom           = new Bloom();
            mBlur            = new Blur();
            mDirectionalBlur = new DirectionalBlur();
            mRadialBlur      = new RadialBlur();
            mPixellate       = new Pixellate();

            // Create the combine order list
            mEffectCombineOrder = new List <PostProcessingEffectBase>();

            // Add effects to combine order list in default order
            mEffectCombineOrder.Add(mBlur);
            mEffectCombineOrder.Add(mDirectionalBlur);
            mEffectCombineOrder.Add(mRadialBlur);
            mEffectCombineOrder.Add(mBloom);
            mEffectCombineOrder.Add(mPixellate);

            // Initialize all effects
            mBloom.InitializeEffect();
            mBlur.InitializeEffect();
            mDirectionalBlur.InitializeEffect();
            mRadialBlur.InitializeEffect();
            mPixellate.InitializeEffect();
        }
        public void InitializeEffects()
        {
            // Create the render target set
            //mRenderTargets = new Dictionary<SurfaceFormat, RenderTargetPair>();

            // Load all effects
            mBloom = new Bloom();
            mBlur = new Blur();
            mDirectionalBlur = new DirectionalBlur();
            mRadialBlur = new RadialBlur();
            mPixellate = new Pixellate();

            // Create the combine order list
            mEffectCombineOrder = new List<PostProcessingEffectBase>();

            // Add effects to combine order list in default order
            mEffectCombineOrder.Add(mBlur);
            mEffectCombineOrder.Add(mDirectionalBlur);
            mEffectCombineOrder.Add(mRadialBlur);
            mEffectCombineOrder.Add(mBloom);
            mEffectCombineOrder.Add(mPixellate);

            // Initialize all effects
            mBloom.InitializeEffect();
            mBlur.InitializeEffect();
            mDirectionalBlur.InitializeEffect();
            mRadialBlur.InitializeEffect();
            mPixellate.InitializeEffect();
        }