public ShadowMapTexture(GraphicsDevice graphicsDevice, ShadowMapFilterType filterType, int shadowMapSize) { IsVarianceShadowMap = filterType == ShadowMapFilterType.Variance; if (filterType == ShadowMapFilterType.Variance) { ShadowMapDepthTexture = Texture.New2D(graphicsDevice, shadowMapSize, shadowMapSize, PixelFormat.D32_Float, TextureFlags.DepthStencil | TextureFlags.ShaderResource); ShadowMapTargetTexture = Texture.New2D(graphicsDevice, shadowMapSize, shadowMapSize, PixelFormat.R32G32_Float, TextureFlags.RenderTarget | TextureFlags.ShaderResource); IntermediateBlurTexture = Texture.New2D(graphicsDevice, shadowMapSize, shadowMapSize, PixelFormat.R32G32_Float, TextureFlags.RenderTarget | TextureFlags.ShaderResource); } else ShadowMapDepthTexture = Texture.New2D(graphicsDevice, shadowMapSize, shadowMapSize, PixelFormat.D32_Float, TextureFlags.DepthStencil | TextureFlags.ShaderResource); GuillotinePacker = new GuillotinePacker(); }