Exemple #1
0
        private void DrawCustomEffect()
        {
            GraphicsDevice.Copy(hdrTexture, hdrRenderTexture);

            if (Input.IsKeyDown(Keys.Left))
            {
                postProcessingEffects.BrightFilter.Threshold -= 10.0f;
                Trace.WriteLine(string.Format("BrightFilter Threshold: {0}", postProcessingEffects.BrightFilter.Threshold));
            }
            else if (Input.IsKeyDown(Keys.Right))
            {
                postProcessingEffects.BrightFilter.Threshold += 10.0f;
                Trace.WriteLine(string.Format("BrightFilter Threshold: {0}", postProcessingEffects.BrightFilter.Threshold));
            }

            postProcessingEffects.Bloom.Enabled       = !Input.IsKeyDown(Keys.Space);
            postProcessingEffects.Bloom.ShowOnlyBloom = !Input.IsKeyDown(Keys.B);
            if (Input.IsKeyDown(Keys.Down))
            {
                postProcessingEffects.Bloom.Amount += -0.01f;
                Trace.WriteLine(string.Format("Bloom Amount: {0}", postProcessingEffects.Bloom.Amount));
            }
            else if (Input.IsKeyDown(Keys.Up))
            {
                postProcessingEffects.Bloom.Amount += +0.01f;
                Trace.WriteLine(string.Format("Bloom Amount: {0}", postProcessingEffects.Bloom.Amount));
            }


            postProcessingEffects.SetInput(hdrRenderTexture);
            postProcessingEffects.SetOutput(GraphicsDevice.BackBuffer);
            postProcessingEffects.Draw();
        }
Exemple #2
0
        private void DrawCustomEffect(RenderDrawContext context)
        {
            GraphicsContext.CommandList.CopyRegion(hdrTexture, 0, null, hdrRenderTexture, 0);

            postProcessingEffects.SetInput(hdrRenderTexture);
            postProcessingEffects.SetOutput(GraphicsContext.CommandList.RenderTarget);
            postProcessingEffects.Draw(context);
        }
Exemple #3
0
        private void DrawCustomEffect()
        {
            GraphicsDevice.CopyRegion(hdrTexture, 0, null, hdrRenderTexture, 0);

            postProcessingEffects.SetInput(hdrRenderTexture);
            postProcessingEffects.SetOutput(GraphicsDevice.BackBuffer);
            postProcessingEffects.Draw();
        }