コード例 #1
0
        protected override void InitializeCore()
        {
            base.InitializeCore();

            coclinearDepthMapEffect             = ToLoadAndUnload(new ImageEffectShader("CoCLinearDepthShader"));
            combineLevelsEffect                 = ToLoadAndUnload(new ImageEffectShader("CombineLevelsFromCoCEffect"));
            combineLevelsFrontEffect            = ToLoadAndUnload(new ImageEffectShader("CombineFrontCoCEffect"));
            combineLevelsFrontEffect.BlendState = BlendStates.AlphaBlend;
            textureScaler          = ToLoadAndUnload(new ImageScaler(SamplingPattern.Expanded));
            cocMapBlur             = ToLoadAndUnload(new CoCMapBlur());
            thresholdAlphaCoC      = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoC"));
            thresholdAlphaCoCFront = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoCFront"));
            pointDepthShader       = ToLoadAndUnload(new ImageEffectShader("PointDepth"));
            depthReadBack          = ToLoadAndUnload(new ImageReadback <Half>());
            depthCenter1x1         = Texture.New2D(GraphicsDevice, 1, 1, 1, PixelFormat.R16_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this);
        }
コード例 #2
0
        protected override void InitializeCore()
        {
            base.InitializeCore();

            textureScaler = ToLoadAndUnload(new ImageScaler());
        }