PSSMDemo.GaussianBlur.GaussianBlur C# (CSharp) Method

GaussianBlur() public method

public GaussianBlur ( GraphicsDevice graphicsDevice, int width, int height, SurfaceFormat format, Effect effect ) : System
graphicsDevice GraphicsDevice
width int
height int
format SurfaceFormat
effect Microsoft.Xna.Framework.Graphics.Effect
return System
        public GaussianBlur(GraphicsDevice graphicsDevice, int width, int height, SurfaceFormat format, Effect effect)
        {
            if (graphicsDevice == null) throw new ArgumentNullException("graphicsDevice");
            if (width < 1) throw new ArgumentOutOfRangeException("width");
            if (height < 1) throw new ArgumentOutOfRangeException("height");
            if (height < 1) throw new ArgumentOutOfRangeException("height");

            GraphicsDevice = graphicsDevice;
            Width = width;
            Height = height;
            this.effect = effect;

            gaussianBlurEffect = new GaussianBlurEffect(effect);
            gaussianBlurEffect.Width = width;
            gaussianBlurEffect.Height = height;

            spriteBatch = new SpriteBatch(graphicsDevice);

            backingRenderTarget = new RenderTarget2D(graphicsDevice, width, height, false, format, DepthFormat.None);
        }