Пример #1
0
        protected override void InitializeCore()
        {
            base.InitializeCore();

            coclinearDepthMapEffect  = ToLoadAndUnload(new ImageEffectShader("CoCLinearDepthShader"));
            combineLevelsEffect      = ToLoadAndUnload(new ImageEffectShader("CombineLevelsFromCoCEffect"));
            combineLevelsFrontEffect = ToLoadAndUnload(new ImageEffectShader("CombineFrontCoCEffect"));
            textureScaler            = ToLoadAndUnload(new ImageScaler());
            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();

            coclinearDepthMapEffect = ToLoadAndUnload(new ImageEffectShader("CoCLinearDepthShader"));
            combineLevelsEffect = ToLoadAndUnload(new ImageEffectShader("CombineLevelsFromCoCEffect"));
            combineLevelsFrontEffect = ToLoadAndUnload(new ImageEffectShader("CombineFrontCoCEffect"));
            textureScaler = ToLoadAndUnload(new ImageScaler());
            cocMapBlur = ToLoadAndUnload(new CoCMapBlur());
            thresholdAlphaCoC = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoC"));
            thresholdAlphaCoCFront = ToLoadAndUnload(new ImageEffectShader("ThresholdAlphaCoCFront"));
            pointDepthShader = ToLoadAndUnload(new ImageEffectShader("PointDepth"));
            depthReadBack = ToLoadAndUnload(new ImageReadback<Half>(Context));
            depthCenter1x1 = Texture.New2D(GraphicsDevice, 1, 1, 1, PixelFormat.R16_Float, TextureFlags.ShaderResource | TextureFlags.RenderTarget).DisposeBy(this);
            depthReadBack.SetInput(depthCenter1x1);
        }