public void Filter(Texture2D source, RenderTarget2D destination)
{
var previousBlendState = GraphicsDevice.BlendState;
var previousDepthStencilState = GraphicsDevice.DepthStencilState;
var previousRasterizerState = GraphicsDevice.RasterizerState;
var previousSamplerState = GraphicsDevice.SamplerStates[0];
GraphicsDevice.BlendState = BlendState.Opaque;
GraphicsDevice.DepthStencilState = DepthStencilState.None;
GraphicsDevice.RasterizerState = RasterizerState.CullCounterClockwise;
GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;
Filter(source, backingRenderTarget, GaussianBlurEffectPass.Horizon);
Filter(backingRenderTarget, destination, GaussianBlurEffectPass.Vertical);
GraphicsDevice.SetRenderTarget(null);
// ステートを以前の状態へ戻す。
GraphicsDevice.BlendState = previousBlendState;
GraphicsDevice.DepthStencilState = previousDepthStencilState;
GraphicsDevice.RasterizerState = previousRasterizerState;
GraphicsDevice.SamplerStates[0] = previousSamplerState;
}