فهرست منبع

HLSL Shader Effects W.I.P

Ruben 5 سال پیش
والد
کامیت
c59ffb7d54
52فایلهای تغییر یافته به همراه2300 افزوده شده و 35 حذف شده
  1. 1929 0
      PicView/Misc/Hlsl.cs
  2. BIN
      PicView/Misc/PsEffects/BandedSwirlEffect.ps
  3. BIN
      PicView/Misc/PsEffects/BandsEffect.ps
  4. BIN
      PicView/Misc/PsEffects/BloomEffect.ps
  5. BIN
      PicView/Misc/PsEffects/ColorToneEffect.ps
  6. BIN
      PicView/Misc/PsEffects/DirectionalBlurEffect.ps
  7. BIN
      PicView/Misc/PsEffects/EmbossedEffect.ps
  8. BIN
      PicView/Misc/PsEffects/FrostyOutlineEffect.ps
  9. BIN
      PicView/Misc/PsEffects/GlassTilesEffect.ps
  10. BIN
      PicView/Misc/PsEffects/GloomEffect.ps
  11. BIN
      PicView/Misc/PsEffects/GrayscaleEffect.ps
  12. BIN
      PicView/Misc/PsEffects/GrowablePoissonDiskEffect.ps
  13. BIN
      PicView/Misc/PsEffects/InvertColorEffect.ps
  14. BIN
      PicView/Misc/PsEffects/MagnifySmoothEffect.ps
  15. BIN
      PicView/Misc/PsEffects/MonochromeEffect.ps
  16. BIN
      PicView/Misc/PsEffects/MultiInput_ColorChannelsEffect.ps
  17. BIN
      PicView/Misc/PsEffects/OldMovieEffect.ps
  18. BIN
      PicView/Misc/PsEffects/PaperFoldEffect.ps
  19. BIN
      PicView/Misc/PsEffects/PivotEffect.ps
  20. BIN
      PicView/Misc/PsEffects/PixelateEffect.ps
  21. BIN
      PicView/Misc/PsEffects/PixelateOutTransitionEffect.ps
  22. BIN
      PicView/Misc/PsEffects/RadGradientEffect.ps
  23. BIN
      PicView/Misc/PsEffects/ReflectionEffect.ps
  24. BIN
      PicView/Misc/PsEffects/RippleEffect.ps
  25. BIN
      PicView/Misc/PsEffects/SharpenEffect.ps
  26. BIN
      PicView/Misc/PsEffects/SketchGraniteEffect.ps
  27. BIN
      PicView/Misc/PsEffects/SketchPencilStrokeEffect.ps
  28. BIN
      PicView/Misc/PsEffects/SplinterEffect.ps
  29. BIN
      PicView/Misc/PsEffects/StarGeneratorEffect.ps
  30. BIN
      PicView/Misc/PsEffects/SwirlEffect.ps
  31. BIN
      PicView/Misc/PsEffects/TelescopicBlurPS3Effect.ps
  32. BIN
      PicView/Misc/PsEffects/TilerEffect.ps
  33. BIN
      PicView/Misc/PsEffects/ToneMappingEffect.ps
  34. BIN
      PicView/Misc/PsEffects/ToonShaderEffect.ps
  35. BIN
      PicView/Misc/PsEffects/Transition_BandedSwirlEffect.ps
  36. BIN
      PicView/Misc/PsEffects/Transition_BlindsEffect.ps
  37. BIN
      PicView/Misc/PsEffects/Transition_BloodEffect.ps
  38. BIN
      PicView/Misc/PsEffects/Transition_CircleRevealEffect.ps
  39. BIN
      PicView/Misc/PsEffects/Transition_CircleStretchEffect.ps
  40. BIN
      PicView/Misc/PsEffects/Transition_CircularBlurEffect.ps
  41. BIN
      PicView/Misc/PsEffects/Transition_CloudRevealEffect.ps
  42. BIN
      PicView/Misc/PsEffects/Transition_CrumbleEffect.ps
  43. BIN
      PicView/Misc/PsEffects/Transition_RippleEffect.ps
  44. BIN
      PicView/Misc/PsEffects/Transition_WaterEffect.ps
  45. BIN
      PicView/Misc/PsEffects/TransparentAlternatingPixelsEffect.ps
  46. BIN
      PicView/Misc/PsEffects/TransparentAlternatingPixelsMultipliedEffect.ps
  47. BIN
      PicView/Misc/PsEffects/TransparentAlternatingScanlinesEffect.ps
  48. BIN
      PicView/Misc/PsEffects/UnderwaterEffect.ps
  49. BIN
      PicView/Misc/PsEffects/WaveWarperEffect.ps
  50. 7 3
      PicView/PicView.csproj
  51. 31 32
      PicView/Windows/Effects.xaml
  52. 333 0
      PicView/Windows/Effects.xaml.cs

+ 1929 - 0
PicView/Misc/Hlsl.cs

@@ -0,0 +1,1929 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Denne kode blev oprettet ved hj?lp af et v?rkt?j.
+//     Runtime-version:4.0.30319.18010
+//
+//     ?ndringer af denne fil kan resultere i ukorrekt funktion, og ?ndringerne mistes, hvis
+//     koden oprettes igen.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+using System;
+using System.Windows;
+using System.Windows.Media;
+using System.Windows.Media.Effects;
+using System.Windows.Media.Media3D;
+
+
+namespace PicView.HlslEffects
+{
+
+    /// <summary>An effect that inverts all colors.</summary>
+    public class InvertColorEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(InvertColorEffect), 0);
+        public InvertColorEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/InvertColorEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+    }
+    /// <summary>A transition effect </summary>
+    public class Transition_RippleEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(Transition_RippleEffect), 0);
+        public static readonly DependencyProperty Texture2Property = ShaderEffect.RegisterPixelShaderSamplerProperty("Texture2", typeof(Transition_RippleEffect), 1);
+        public static readonly DependencyProperty ProgressProperty = DependencyProperty.Register("Progress", typeof(double), typeof(Transition_RippleEffect), new UIPropertyMetadata(((double)(30D)), PixelShaderConstantCallback(0)));
+        public Transition_RippleEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/Transition_RippleEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(Texture2Property);
+            this.UpdateShaderValue(ProgressProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        public Brush Texture2
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(Texture2Property)));
+            }
+            set
+            {
+                this.SetValue(Texture2Property, value);
+            }
+        }
+        /// <summary>The amount(%) of the transition from first texture to the second texture. </summary>
+        public double Progress
+        {
+            get
+            {
+                return ((double)(this.GetValue(ProgressProperty)));
+            }
+            set
+            {
+                this.SetValue(ProgressProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that blends between partial desaturation and a two-color ramp.</summary>
+    public class ColorToneEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(ColorToneEffect), 0);
+        public static readonly DependencyProperty DesaturationProperty = DependencyProperty.Register("Desaturation", typeof(double), typeof(ColorToneEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty TonedProperty = DependencyProperty.Register("Toned", typeof(double), typeof(ColorToneEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty LightColorProperty = DependencyProperty.Register("LightColor", typeof(Color), typeof(ColorToneEffect), new UIPropertyMetadata(Color.FromArgb(255, 255, 255, 0), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty DarkColorProperty = DependencyProperty.Register("DarkColor", typeof(Color), typeof(ColorToneEffect), new UIPropertyMetadata(Color.FromArgb(255, 0, 0, 128), PixelShaderConstantCallback(3)));
+        public ColorToneEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/ColorToneEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(DesaturationProperty);
+            this.UpdateShaderValue(TonedProperty);
+            this.UpdateShaderValue(LightColorProperty);
+            this.UpdateShaderValue(DarkColorProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The amount of desaturation to apply.</summary>
+        public double Desaturation
+        {
+            get
+            {
+                return ((double)(this.GetValue(DesaturationProperty)));
+            }
+            set
+            {
+                this.SetValue(DesaturationProperty, value);
+            }
+        }
+        /// <summary>The amount of color toning to apply.</summary>
+        public double Toned
+        {
+            get
+            {
+                return ((double)(this.GetValue(TonedProperty)));
+            }
+            set
+            {
+                this.SetValue(TonedProperty, value);
+            }
+        }
+        /// <summary>The first color to apply to input. This is usually a light tone.</summary>
+        public Color LightColor
+        {
+            get
+            {
+                return ((Color)(this.GetValue(LightColorProperty)));
+            }
+            set
+            {
+                this.SetValue(LightColorProperty, value);
+            }
+        }
+        /// <summary>The second color to apply to the input. This is usuall a dark tone.</summary>
+        public Color DarkColor
+        {
+            get
+            {
+                return ((Color)(this.GetValue(DarkColorProperty)));
+            }
+            set
+            {
+                this.SetValue(DarkColorProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that turns the input into shades of a single color.</summary>
+    public class MonochromeEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(MonochromeEffect), 0);
+        public static readonly DependencyProperty FilterColorProperty = DependencyProperty.Register("FilterColor", typeof(Color), typeof(MonochromeEffect), new UIPropertyMetadata(Color.FromArgb(255, 255, 255, 0), PixelShaderConstantCallback(0)));
+        public MonochromeEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/MonochromeEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(FilterColorProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The color used to tint the input.</summary>
+        public Color FilterColor
+        {
+            get
+            {
+                return ((Color)(this.GetValue(FilterColorProperty)));
+            }
+            set
+            {
+                this.SetValue(FilterColorProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that superimposes rippling waves upon the input.</summary>
+    public class RippleEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(RippleEffect), 0);
+        public static readonly DependencyProperty CenterProperty = DependencyProperty.Register("Center", typeof(Point), typeof(RippleEffect), new UIPropertyMetadata(new Point(0.5D, 0.5D), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty AmplitudeProperty = DependencyProperty.Register("Amplitude", typeof(double), typeof(RippleEffect), new UIPropertyMetadata(((double)(0.1D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty FrequencyProperty = DependencyProperty.Register("Frequency", typeof(double), typeof(RippleEffect), new UIPropertyMetadata(((double)(70D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty PhaseProperty = DependencyProperty.Register("Phase", typeof(double), typeof(RippleEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(3)));
+        public static readonly DependencyProperty AspectRatioProperty = DependencyProperty.Register("AspectRatio", typeof(double), typeof(RippleEffect), new UIPropertyMetadata(((double)(1.5D)), PixelShaderConstantCallback(4)));
+        public RippleEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/RippleEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(CenterProperty);
+            this.UpdateShaderValue(AmplitudeProperty);
+            this.UpdateShaderValue(FrequencyProperty);
+            this.UpdateShaderValue(PhaseProperty);
+            this.UpdateShaderValue(AspectRatioProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The center point of the ripples.</summary>
+        public Point Center
+        {
+            get
+            {
+                return ((Point)(this.GetValue(CenterProperty)));
+            }
+            set
+            {
+                this.SetValue(CenterProperty, value);
+            }
+        }
+        /// <summary>The amplitude of the ripples.</summary>
+        public double Amplitude
+        {
+            get
+            {
+                return ((double)(this.GetValue(AmplitudeProperty)));
+            }
+            set
+            {
+                this.SetValue(AmplitudeProperty, value);
+            }
+        }
+        /// <summary>The frequency of the ripples.</summary>
+        public double Frequency
+        {
+            get
+            {
+                return ((double)(this.GetValue(FrequencyProperty)));
+            }
+            set
+            {
+                this.SetValue(FrequencyProperty, value);
+            }
+        }
+        /// <summary>The phase of the ripples.</summary>
+        public double Phase
+        {
+            get
+            {
+                return ((double)(this.GetValue(PhaseProperty)));
+            }
+            set
+            {
+                this.SetValue(PhaseProperty, value);
+            }
+        }
+        /// <summary>The aspect ratio (width / height) of the input.</summary>
+        public double AspectRatio
+        {
+            get
+            {
+                return ((double)(this.GetValue(AspectRatioProperty)));
+            }
+            set
+            {
+                this.SetValue(AspectRatioProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that swirls the input in a spiral.</summary>
+    public class SwirlEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(SwirlEffect), 0);
+        public static readonly DependencyProperty CenterProperty = DependencyProperty.Register("Center", typeof(Point), typeof(SwirlEffect), new UIPropertyMetadata(new Point(0.5D, 0.5D), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty SpiralStrengthProperty = DependencyProperty.Register("SpiralStrength", typeof(double), typeof(SwirlEffect), new UIPropertyMetadata(((double)(10D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty AspectRatioProperty = DependencyProperty.Register("AspectRatio", typeof(double), typeof(SwirlEffect), new UIPropertyMetadata(((double)(1.5D)), PixelShaderConstantCallback(2)));
+        public SwirlEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/SwirlEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(CenterProperty);
+            this.UpdateShaderValue(SpiralStrengthProperty);
+            this.UpdateShaderValue(AspectRatioProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The center point of the spiral. (1,1) is lower right corner</summary>
+        public Point Center
+        {
+            get
+            {
+                return ((Point)(this.GetValue(CenterProperty)));
+            }
+            set
+            {
+                this.SetValue(CenterProperty, value);
+            }
+        }
+        /// <summary>The amount of twist to the spiral.</summary>
+        public double SpiralStrength
+        {
+            get
+            {
+                return ((double)(this.GetValue(SpiralStrengthProperty)));
+            }
+            set
+            {
+                this.SetValue(SpiralStrengthProperty, value);
+            }
+        }
+        /// <summary>The aspect ratio (width / height) of the input.</summary>
+        public double AspectRatio
+        {
+            get
+            {
+                return ((double)(this.GetValue(AspectRatioProperty)));
+            }
+            set
+            {
+                this.SetValue(AspectRatioProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that intensifies bright regions.</summary>
+    public class BloomEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(BloomEffect), 0);
+        public static readonly DependencyProperty BloomIntensityProperty = DependencyProperty.Register("BloomIntensity", typeof(double), typeof(BloomEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BaseIntensityProperty = DependencyProperty.Register("BaseIntensity", typeof(double), typeof(BloomEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty BloomSaturationProperty = DependencyProperty.Register("BloomSaturation", typeof(double), typeof(BloomEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty BaseSaturationProperty = DependencyProperty.Register("BaseSaturation", typeof(double), typeof(BloomEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(3)));
+        public BloomEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/BloomEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(BloomIntensityProperty);
+            this.UpdateShaderValue(BaseIntensityProperty);
+            this.UpdateShaderValue(BloomSaturationProperty);
+            this.UpdateShaderValue(BaseSaturationProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>Intensity of the bloom image.</summary>
+        public double BloomIntensity
+        {
+            get
+            {
+                return ((double)(this.GetValue(BloomIntensityProperty)));
+            }
+            set
+            {
+                this.SetValue(BloomIntensityProperty, value);
+            }
+        }
+        /// <summary>Intensity of the base image.</summary>
+        public double BaseIntensity
+        {
+            get
+            {
+                return ((double)(this.GetValue(BaseIntensityProperty)));
+            }
+            set
+            {
+                this.SetValue(BaseIntensityProperty, value);
+            }
+        }
+        /// <summary>Saturation of the bloom image.</summary>
+        public double BloomSaturation
+        {
+            get
+            {
+                return ((double)(this.GetValue(BloomSaturationProperty)));
+            }
+            set
+            {
+                this.SetValue(BloomSaturationProperty, value);
+            }
+        }
+        /// <summary>Saturation of the base image.</summary>
+        public double BaseSaturation
+        {
+            get
+            {
+                return ((double)(this.GetValue(BaseSaturationProperty)));
+            }
+            set
+            {
+                this.SetValue(BaseSaturationProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that applies defogging, exposure, gamma, vignette, and blue shift corrections.</summary>
+    public class ToneMappingEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(ToneMappingEffect), 0);
+        public static readonly DependencyProperty DefogProperty = DependencyProperty.Register("Defog", typeof(double), typeof(ToneMappingEffect), new UIPropertyMetadata(((double)(0.01D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty FogColorProperty = DependencyProperty.Register("FogColor", typeof(Color), typeof(ToneMappingEffect), new UIPropertyMetadata(Color.FromArgb(255, 255, 255, 255), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty ExposureProperty = DependencyProperty.Register("Exposure", typeof(double), typeof(ToneMappingEffect), new UIPropertyMetadata(((double)(0.2D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty GammaProperty = DependencyProperty.Register("Gamma", typeof(double), typeof(ToneMappingEffect), new UIPropertyMetadata(((double)(0.8D)), PixelShaderConstantCallback(3)));
+        public static readonly DependencyProperty VignetteCenterProperty = DependencyProperty.Register("VignetteCenter", typeof(Point), typeof(ToneMappingEffect), new UIPropertyMetadata(new Point(0.5D, 0.5D), PixelShaderConstantCallback(4)));
+        public static readonly DependencyProperty VignetteRadiusProperty = DependencyProperty.Register("VignetteRadius", typeof(double), typeof(ToneMappingEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(5)));
+        public static readonly DependencyProperty VignetteAmountProperty = DependencyProperty.Register("VignetteAmount", typeof(double), typeof(ToneMappingEffect), new UIPropertyMetadata(((double)(-1D)), PixelShaderConstantCallback(6)));
+        public static readonly DependencyProperty BlueShiftProperty = DependencyProperty.Register("BlueShift", typeof(double), typeof(ToneMappingEffect), new UIPropertyMetadata(((double)(0.25D)), PixelShaderConstantCallback(7)));
+        public ToneMappingEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/ToneMappingEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(DefogProperty);
+            this.UpdateShaderValue(FogColorProperty);
+            this.UpdateShaderValue(ExposureProperty);
+            this.UpdateShaderValue(GammaProperty);
+            this.UpdateShaderValue(VignetteCenterProperty);
+            this.UpdateShaderValue(VignetteRadiusProperty);
+            this.UpdateShaderValue(VignetteAmountProperty);
+            this.UpdateShaderValue(BlueShiftProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The amount of fog to remove.</summary>
+        public double Defog
+        {
+            get
+            {
+                return ((double)(this.GetValue(DefogProperty)));
+            }
+            set
+            {
+                this.SetValue(DefogProperty, value);
+            }
+        }
+        /// <summary>The fog color.</summary>
+        public Color FogColor
+        {
+            get
+            {
+                return ((Color)(this.GetValue(FogColorProperty)));
+            }
+            set
+            {
+                this.SetValue(FogColorProperty, value);
+            }
+        }
+        /// <summary>The exposure adjustment.</summary>
+        public double Exposure
+        {
+            get
+            {
+                return ((double)(this.GetValue(ExposureProperty)));
+            }
+            set
+            {
+                this.SetValue(ExposureProperty, value);
+            }
+        }
+        /// <summary>The gamma correction exponent.</summary>
+        public double Gamma
+        {
+            get
+            {
+                return ((double)(this.GetValue(GammaProperty)));
+            }
+            set
+            {
+                this.SetValue(GammaProperty, value);
+            }
+        }
+        /// <summary>The center of vignetting.</summary>
+        public Point VignetteCenter
+        {
+            get
+            {
+                return ((Point)(this.GetValue(VignetteCenterProperty)));
+            }
+            set
+            {
+                this.SetValue(VignetteCenterProperty, value);
+            }
+        }
+        /// <summary>The radius of vignetting.</summary>
+        public double VignetteRadius
+        {
+            get
+            {
+                return ((double)(this.GetValue(VignetteRadiusProperty)));
+            }
+            set
+            {
+                this.SetValue(VignetteRadiusProperty, value);
+            }
+        }
+        /// <summary>The amount of vignetting.</summary>
+        public double VignetteAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(VignetteAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(VignetteAmountProperty, value);
+            }
+        }
+        /// <summary>The amount of blue shift.</summary>
+        public double BlueShift
+        {
+            get
+            {
+                return ((double)(this.GetValue(BlueShiftProperty)));
+            }
+            set
+            {
+                this.SetValue(BlueShiftProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that intensifies dark regions.</summary>
+    public class GloomEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(GloomEffect), 0);
+        public static readonly DependencyProperty GloomIntensityProperty = DependencyProperty.Register("GloomIntensity", typeof(double), typeof(GloomEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BaseIntensityProperty = DependencyProperty.Register("BaseIntensity", typeof(double), typeof(GloomEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty GloomSaturationProperty = DependencyProperty.Register("GloomSaturation", typeof(double), typeof(GloomEffect), new UIPropertyMetadata(((double)(0.2D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty BaseSaturationProperty = DependencyProperty.Register("BaseSaturation", typeof(double), typeof(GloomEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(3)));
+        public GloomEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/GloomEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(GloomIntensityProperty);
+            this.UpdateShaderValue(BaseIntensityProperty);
+            this.UpdateShaderValue(GloomSaturationProperty);
+            this.UpdateShaderValue(BaseSaturationProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>Intensity of the gloom image.</summary>
+        public double GloomIntensity
+        {
+            get
+            {
+                return ((double)(this.GetValue(GloomIntensityProperty)));
+            }
+            set
+            {
+                this.SetValue(GloomIntensityProperty, value);
+            }
+        }
+        /// <summary>Intensity of the base image.</summary>
+        public double BaseIntensity
+        {
+            get
+            {
+                return ((double)(this.GetValue(BaseIntensityProperty)));
+            }
+            set
+            {
+                this.SetValue(BaseIntensityProperty, value);
+            }
+        }
+        /// <summary>Saturation of the gloom image.</summary>
+        public double GloomSaturation
+        {
+            get
+            {
+                return ((double)(this.GetValue(GloomSaturationProperty)));
+            }
+            set
+            {
+                this.SetValue(GloomSaturationProperty, value);
+            }
+        }
+        /// <summary>Saturation of the base image.</summary>
+        public double BaseSaturation
+        {
+            get
+            {
+                return ((double)(this.GetValue(BaseSaturationProperty)));
+            }
+            set
+            {
+                this.SetValue(BaseSaturationProperty, value);
+            }
+        }
+    }
+    public class TelescopicBlurPS3Effect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(TelescopicBlurPS3Effect), 0);
+        public static readonly DependencyProperty CenterXProperty = DependencyProperty.Register("CenterX", typeof(double), typeof(TelescopicBlurPS3Effect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty CenterYProperty = DependencyProperty.Register("CenterY", typeof(double), typeof(TelescopicBlurPS3Effect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty ZoomBlurAmountProperty = DependencyProperty.Register("ZoomBlurAmount", typeof(double), typeof(TelescopicBlurPS3Effect), new UIPropertyMetadata(((double)(2.5D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty EdgeSizeProperty = DependencyProperty.Register("EdgeSize", typeof(double), typeof(TelescopicBlurPS3Effect), new UIPropertyMetadata(((double)(2D)), PixelShaderConstantCallback(4)));
+        public TelescopicBlurPS3Effect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/TelescopicBlurPS3Effect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(CenterXProperty);
+            this.UpdateShaderValue(CenterYProperty);
+            this.UpdateShaderValue(ZoomBlurAmountProperty);
+            this.UpdateShaderValue(EdgeSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>Center X of the Zoom.</summary>
+        public double CenterX
+        {
+            get
+            {
+                return ((double)(this.GetValue(CenterXProperty)));
+            }
+            set
+            {
+                this.SetValue(CenterXProperty, value);
+            }
+        }
+        /// <summary>Center Y of the Zoom.</summary>
+        public double CenterY
+        {
+            get
+            {
+                return ((double)(this.GetValue(CenterYProperty)));
+            }
+            set
+            {
+                this.SetValue(CenterYProperty, value);
+            }
+        }
+        /// <summary>Amount of zoom blur.</summary>
+        public double ZoomBlurAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(ZoomBlurAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(ZoomBlurAmountProperty, value);
+            }
+        }
+        /// <summary>Fuzziness of edges.</summary>
+        public double EdgeSize
+        {
+            get
+            {
+                return ((double)(this.GetValue(EdgeSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(EdgeSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that blurs the input using Poisson disk sampling.</summary>
+    public class GrowablePoissonDiskEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(GrowablePoissonDiskEffect), 0);
+        public static readonly DependencyProperty DiskRadiusProperty = DependencyProperty.Register("DiskRadius", typeof(double), typeof(GrowablePoissonDiskEffect), new UIPropertyMetadata(((double)(5D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty InputSizeProperty = DependencyProperty.Register("InputSize", typeof(Size), typeof(GrowablePoissonDiskEffect), new UIPropertyMetadata(new Size(600D, 400D), PixelShaderConstantCallback(1)));
+        public GrowablePoissonDiskEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/GrowablePoissonDiskEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(DiskRadiusProperty);
+            this.UpdateShaderValue(InputSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The radius of the Poisson disk (in pixels).</summary>
+        public double DiskRadius
+        {
+            get
+            {
+                return ((double)(this.GetValue(DiskRadiusProperty)));
+            }
+            set
+            {
+                this.SetValue(DiskRadiusProperty, value);
+            }
+        }
+        /// <summary>The size of the input (in pixels).</summary>
+        public Size InputSize
+        {
+            get
+            {
+                return ((Size)(this.GetValue(InputSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(InputSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that blurs in a single direction.</summary>
+    public class DirectionalBlurEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(DirectionalBlurEffect), 0);
+        public static readonly DependencyProperty AngleProperty = DependencyProperty.Register("Angle", typeof(double), typeof(DirectionalBlurEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BlurAmountProperty = DependencyProperty.Register("BlurAmount", typeof(double), typeof(DirectionalBlurEffect), new UIPropertyMetadata(((double)(0.003D)), PixelShaderConstantCallback(1)));
+        public DirectionalBlurEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/DirectionalBlurEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(AngleProperty);
+            this.UpdateShaderValue(BlurAmountProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The direction of the blur (in degrees).</summary>
+        public double Angle
+        {
+            get
+            {
+                return ((double)(this.GetValue(AngleProperty)));
+            }
+            set
+            {
+                this.SetValue(AngleProperty, value);
+            }
+        }
+        /// <summary>The scale of the blur (as a fraction of the input size).</summary>
+        public double BlurAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(BlurAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(BlurAmountProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that swirls the input in alternating clockwise and counterclockwise bands.</summary>
+    public class BandedSwirlEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(BandedSwirlEffect), 0);
+        public static readonly DependencyProperty CenterProperty = DependencyProperty.Register("Center", typeof(Point), typeof(BandedSwirlEffect), new UIPropertyMetadata(new Point(0.5D, 0.5D), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BandsProperty = DependencyProperty.Register("Bands", typeof(double), typeof(BandedSwirlEffect), new UIPropertyMetadata(((double)(10D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty StrengthProperty = DependencyProperty.Register("Strength", typeof(double), typeof(BandedSwirlEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty AspectRatioProperty = DependencyProperty.Register("AspectRatio", typeof(double), typeof(BandedSwirlEffect), new UIPropertyMetadata(((double)(1.5D)), PixelShaderConstantCallback(3)));
+        public BandedSwirlEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/BandedSwirlEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(CenterProperty);
+            this.UpdateShaderValue(BandsProperty);
+            this.UpdateShaderValue(StrengthProperty);
+            this.UpdateShaderValue(AspectRatioProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The center of the swirl. (100,100) is lower right corner </summary>
+        public Point Center
+        {
+            get
+            {
+                return ((Point)(this.GetValue(CenterProperty)));
+            }
+            set
+            {
+                this.SetValue(CenterProperty, value);
+            }
+        }
+        /// <summary>The number of bands in the swirl.</summary>
+        public double Bands
+        {
+            get
+            {
+                return ((double)(this.GetValue(BandsProperty)));
+            }
+            set
+            {
+                this.SetValue(BandsProperty, value);
+            }
+        }
+        /// <summary>The strength of the effect.</summary>
+        public double Strength
+        {
+            get
+            {
+                return ((double)(this.GetValue(StrengthProperty)));
+            }
+            set
+            {
+                this.SetValue(StrengthProperty, value);
+            }
+        }
+        /// <summary>The aspect ratio (width / height) of the input.</summary>
+        public double AspectRatio
+        {
+            get
+            {
+                return ((double)(this.GetValue(AspectRatioProperty)));
+            }
+            set
+            {
+                this.SetValue(AspectRatioProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that creates bands of bright regions.</summary>
+    public class BandsEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(BandsEffect), 0);
+        public static readonly DependencyProperty BandDensityProperty = DependencyProperty.Register("BandDensity", typeof(double), typeof(BandsEffect), new UIPropertyMetadata(((double)(65D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BandIntensityProperty = DependencyProperty.Register("BandIntensity", typeof(double), typeof(BandsEffect), new UIPropertyMetadata(((double)(0.056D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty IsRightSideBandProperty = DependencyProperty.Register("IsRightSideBand", typeof(double), typeof(BandsEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(2)));
+        public BandsEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/BandsEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(BandDensityProperty);
+            this.UpdateShaderValue(BandIntensityProperty);
+            this.UpdateShaderValue(IsRightSideBandProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The number of vertical bands to add to the output. The higher the value the more bands.</summary>
+        public double BandDensity
+        {
+            get
+            {
+                return ((double)(this.GetValue(BandDensityProperty)));
+            }
+            set
+            {
+                this.SetValue(BandDensityProperty, value);
+            }
+        }
+        /// <summary>Intensity of each band.</summary>
+        public double BandIntensity
+        {
+            get
+            {
+                return ((double)(this.GetValue(BandIntensityProperty)));
+            }
+            set
+            {
+                this.SetValue(BandIntensityProperty, value);
+            }
+        }
+        /// <summary>If set to 1, the wide border is on the ight side.</summary>
+        public double IsRightSideBand
+        {
+            get
+            {
+                return ((double)(this.GetValue(IsRightSideBandProperty)));
+            }
+            set
+            {
+                this.SetValue(IsRightSideBandProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that embosses the input.</summary>
+    public class EmbossedEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(EmbossedEffect), 0);
+        public static readonly DependencyProperty EmbossedAmountProperty = DependencyProperty.Register("EmbossedAmount", typeof(double), typeof(EmbossedEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty WidthProperty = DependencyProperty.Register("Width", typeof(double), typeof(EmbossedEffect), new UIPropertyMetadata(((double)(0.003D)), PixelShaderConstantCallback(1)));
+        public EmbossedEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/EmbossedEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(EmbossedAmountProperty);
+            this.UpdateShaderValue(WidthProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The amplitude of the embossing.</summary>
+        public double EmbossedAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(EmbossedAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(EmbossedAmountProperty, value);
+            }
+        }
+        /// <summary>The separation between samples (as a fraction of input size).</summary>
+        public double Width
+        {
+            get
+            {
+                return ((double)(this.GetValue(WidthProperty)));
+            }
+            set
+            {
+                this.SetValue(WidthProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect mimics the look of glass tiles.</summary>
+    public class GlassTilesEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(GlassTilesEffect), 0);
+        public static readonly DependencyProperty TilesProperty = DependencyProperty.Register("Tiles", typeof(double), typeof(GlassTilesEffect), new UIPropertyMetadata(((double)(5D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BevelWidthProperty = DependencyProperty.Register("BevelWidth", typeof(double), typeof(GlassTilesEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty OffsetProperty = DependencyProperty.Register("Offset", typeof(double), typeof(GlassTilesEffect), new UIPropertyMetadata(((double)(1D)), PixelShaderConstantCallback(3)));
+        public static readonly DependencyProperty GroutColorProperty = DependencyProperty.Register("GroutColor", typeof(Color), typeof(GlassTilesEffect), new UIPropertyMetadata(Color.FromArgb(255, 0, 0, 0), PixelShaderConstantCallback(2)));
+        public GlassTilesEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/GlassTilesEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(TilesProperty);
+            this.UpdateShaderValue(BevelWidthProperty);
+            this.UpdateShaderValue(OffsetProperty);
+            this.UpdateShaderValue(GroutColorProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The approximate number of tiles per row/column.</summary>
+        public double Tiles
+        {
+            get
+            {
+                return ((double)(this.GetValue(TilesProperty)));
+            }
+            set
+            {
+                this.SetValue(TilesProperty, value);
+            }
+        }
+        public double BevelWidth
+        {
+            get
+            {
+                return ((double)(this.GetValue(BevelWidthProperty)));
+            }
+            set
+            {
+                this.SetValue(BevelWidthProperty, value);
+            }
+        }
+        public double Offset
+        {
+            get
+            {
+                return ((double)(this.GetValue(OffsetProperty)));
+            }
+            set
+            {
+                this.SetValue(OffsetProperty, value);
+            }
+        }
+        public Color GroutColor
+        {
+            get
+            {
+                return ((Color)(this.GetValue(GroutColorProperty)));
+            }
+            set
+            {
+                this.SetValue(GroutColorProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that magnifies a circular region with a smooth boundary.</summary>
+    public class MagnifySmoothEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(MagnifySmoothEffect), 0);
+        public static readonly DependencyProperty CenterPointProperty = DependencyProperty.Register("CenterPoint", typeof(Point), typeof(MagnifySmoothEffect), new UIPropertyMetadata(new Point(0.5D, 0.5D), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty InnerRadiusProperty = DependencyProperty.Register("InnerRadius", typeof(double), typeof(MagnifySmoothEffect), new UIPropertyMetadata(((double)(0.2D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty OuterRadiusProperty = DependencyProperty.Register("OuterRadius", typeof(double), typeof(MagnifySmoothEffect), new UIPropertyMetadata(((double)(0.4D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty MagnificationAmountProperty = DependencyProperty.Register("MagnificationAmount", typeof(double), typeof(MagnifySmoothEffect), new UIPropertyMetadata(((double)(2D)), PixelShaderConstantCallback(3)));
+        public static readonly DependencyProperty AspectRatioProperty = DependencyProperty.Register("AspectRatio", typeof(double), typeof(MagnifySmoothEffect), new UIPropertyMetadata(((double)(1.5D)), PixelShaderConstantCallback(4)));
+        public MagnifySmoothEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/MagnifySmoothEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(CenterPointProperty);
+            this.UpdateShaderValue(InnerRadiusProperty);
+            this.UpdateShaderValue(OuterRadiusProperty);
+            this.UpdateShaderValue(MagnificationAmountProperty);
+            this.UpdateShaderValue(AspectRatioProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The center point of the magnified region.</summary>
+        public Point CenterPoint
+        {
+            get
+            {
+                return ((Point)(this.GetValue(CenterPointProperty)));
+            }
+            set
+            {
+                this.SetValue(CenterPointProperty, value);
+            }
+        }
+        /// <summary>The inner radius of the magnified region.</summary>
+        public double InnerRadius
+        {
+            get
+            {
+                return ((double)(this.GetValue(InnerRadiusProperty)));
+            }
+            set
+            {
+                this.SetValue(InnerRadiusProperty, value);
+            }
+        }
+        /// <summary>The outer radius of the magnified region.</summary>
+        public double OuterRadius
+        {
+            get
+            {
+                return ((double)(this.GetValue(OuterRadiusProperty)));
+            }
+            set
+            {
+                this.SetValue(OuterRadiusProperty, value);
+            }
+        }
+        /// <summary>The magnification factor.</summary>
+        public double MagnificationAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(MagnificationAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(MagnificationAmountProperty, value);
+            }
+        }
+        /// <summary>The aspect ratio (width / height) of the input.</summary>
+        public double AspectRatio
+        {
+            get
+            {
+                return ((double)(this.GetValue(AspectRatioProperty)));
+            }
+            set
+            {
+                this.SetValue(AspectRatioProperty, value);
+            }
+        }
+    }
+    public class PaperFoldEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(PaperFoldEffect), 0);
+        public static readonly DependencyProperty FoldAmountProperty = DependencyProperty.Register("FoldAmount", typeof(double), typeof(PaperFoldEffect), new UIPropertyMetadata(((double)(0.2D)), PixelShaderConstantCallback(0)));
+        public PaperFoldEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/PaperFoldEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(FoldAmountProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The Fold Amount, zero is no effect, 1 i full fold</summary>
+        public double FoldAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(FoldAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(FoldAmountProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that pivots the output around a center point.</summary>
+    public class PivotEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(PivotEffect), 0);
+        public static readonly DependencyProperty PivotAmountProperty = DependencyProperty.Register("PivotAmount", typeof(double), typeof(PivotEffect), new UIPropertyMetadata(((double)(0.2D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty EdgeProperty = DependencyProperty.Register("Edge", typeof(double), typeof(PivotEffect), new UIPropertyMetadata(((double)(0.5D)), PixelShaderConstantCallback(1)));
+        public PivotEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/PivotEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(PivotAmountProperty);
+            this.UpdateShaderValue(EdgeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The pivot amount</summary>
+        public double PivotAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(PivotAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(PivotAmountProperty, value);
+            }
+        }
+        public double Edge
+        {
+            get
+            {
+                return ((double)(this.GetValue(EdgeProperty)));
+            }
+            set
+            {
+                this.SetValue(EdgeProperty, value);
+            }
+        }
+    }
+    /// <summary>Applies water defraction effect.</summary>
+    public class UnderwaterEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(UnderwaterEffect), 0);
+        public static readonly DependencyProperty TimerProperty = DependencyProperty.Register("Timer", typeof(double), typeof(UnderwaterEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty RefractonProperty = DependencyProperty.Register("Refracton", typeof(double), typeof(UnderwaterEffect), new UIPropertyMetadata(((double)(50D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty VerticalTroughWidthProperty = DependencyProperty.Register("VerticalTroughWidth", typeof(double), typeof(UnderwaterEffect), new UIPropertyMetadata(((double)(23D)), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty Wobble2Property = DependencyProperty.Register("Wobble2", typeof(double), typeof(UnderwaterEffect), new UIPropertyMetadata(((double)(23D)), PixelShaderConstantCallback(3)));
+        public UnderwaterEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/UnderwaterEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(TimerProperty);
+            this.UpdateShaderValue(RefractonProperty);
+            this.UpdateShaderValue(VerticalTroughWidthProperty);
+            this.UpdateShaderValue(Wobble2Property);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        public double Timer
+        {
+            get
+            {
+                return ((double)(this.GetValue(TimerProperty)));
+            }
+            set
+            {
+                this.SetValue(TimerProperty, value);
+            }
+        }
+        /// <summary>Refraction Amount.</summary>
+        public double Refracton
+        {
+            get
+            {
+                return ((double)(this.GetValue(RefractonProperty)));
+            }
+            set
+            {
+                this.SetValue(RefractonProperty, value);
+            }
+        }
+        /// <summary>Vertical trough</summary>
+        public double VerticalTroughWidth
+        {
+            get
+            {
+                return ((double)(this.GetValue(VerticalTroughWidthProperty)));
+            }
+            set
+            {
+                this.SetValue(VerticalTroughWidthProperty, value);
+            }
+        }
+        /// <summary>Center X of the Zoom.</summary>
+        public double Wobble2
+        {
+            get
+            {
+                return ((double)(this.GetValue(Wobble2Property)));
+            }
+            set
+            {
+                this.SetValue(Wobble2Property, value);
+            }
+        }
+    }
+    /// <summary>An effect that applies a wave pattern to the inputSampler.</summary>
+    public class WaveWarperEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(WaveWarperEffect), 0);
+        public static readonly DependencyProperty TimeProperty = DependencyProperty.Register("Time", typeof(double), typeof(WaveWarperEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty WaveSizeProperty = DependencyProperty.Register("WaveSize", typeof(double), typeof(WaveWarperEffect), new UIPropertyMetadata(((double)(64D)), PixelShaderConstantCallback(1)));
+        public WaveWarperEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/WaveWarperEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(TimeProperty);
+            this.UpdateShaderValue(WaveSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        public double Time
+        {
+            get
+            {
+                return ((double)(this.GetValue(TimeProperty)));
+            }
+            set
+            {
+                this.SetValue(TimeProperty, value);
+            }
+        }
+        /// <summary>The distance between waves. (the higher the value the closer the waves are to their neighbor).</summary>
+        public double WaveSize
+        {
+            get
+            {
+                return ((double)(this.GetValue(WaveSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(WaveSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that turns the inputSampler into shades of a single color.</summary>
+    public class FrostyOutlineEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(FrostyOutlineEffect), 0);
+        public static readonly DependencyProperty WidthProperty = DependencyProperty.Register("Width", typeof(double), typeof(FrostyOutlineEffect), new UIPropertyMetadata(((double)(500D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty HeightProperty = DependencyProperty.Register("Height", typeof(double), typeof(FrostyOutlineEffect), new UIPropertyMetadata(((double)(300D)), PixelShaderConstantCallback(1)));
+        public FrostyOutlineEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/FrostyOutlineEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(WidthProperty);
+            this.UpdateShaderValue(HeightProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The width of the frost.</summary>
+        public double Width
+        {
+            get
+            {
+                return ((double)(this.GetValue(WidthProperty)));
+            }
+            set
+            {
+                this.SetValue(WidthProperty, value);
+            }
+        }
+        /// <summary>The height of the frost.</summary>
+        public double Height
+        {
+            get
+            {
+                return ((double)(this.GetValue(HeightProperty)));
+            }
+            set
+            {
+                this.SetValue(HeightProperty, value);
+            }
+        }
+    }
+    /// <summary>Pixel shader which produces random scratches, noise and other FX like an old projector</summary>
+    public class OldMovieEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(OldMovieEffect), 0);
+        public static readonly DependencyProperty ScratchAmountProperty = DependencyProperty.Register("ScratchAmount", typeof(double), typeof(OldMovieEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty NoiseAmountProperty = DependencyProperty.Register("NoiseAmount", typeof(double), typeof(OldMovieEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty RandomCoord1Property = DependencyProperty.Register("RandomCoord1", typeof(Point), typeof(OldMovieEffect), new UIPropertyMetadata(new Point(0D, 0D), PixelShaderConstantCallback(2)));
+        public static readonly DependencyProperty RandomCoord2Property = DependencyProperty.Register("RandomCoord2", typeof(Point), typeof(OldMovieEffect), new UIPropertyMetadata(new Point(0D, 0D), PixelShaderConstantCallback(3)));
+        public static readonly DependencyProperty FrameProperty = DependencyProperty.Register("Frame", typeof(double), typeof(OldMovieEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(4)));
+        public static readonly DependencyProperty NoiseSamplerProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("NoiseSampler", typeof(OldMovieEffect), 1);
+        public OldMovieEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/OldMovieEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(ScratchAmountProperty);
+            this.UpdateShaderValue(NoiseAmountProperty);
+            this.UpdateShaderValue(RandomCoord1Property);
+            this.UpdateShaderValue(RandomCoord2Property);
+            this.UpdateShaderValue(FrameProperty);
+            this.UpdateShaderValue(NoiseSamplerProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        public double ScratchAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(ScratchAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(ScratchAmountProperty, value);
+            }
+        }
+        public double NoiseAmount
+        {
+            get
+            {
+                return ((double)(this.GetValue(NoiseAmountProperty)));
+            }
+            set
+            {
+                this.SetValue(NoiseAmountProperty, value);
+            }
+        }
+        /// <summary>The random coordinate 1 that is used for lookup in the noise texture.</summary>
+        public Point RandomCoord1
+        {
+            get
+            {
+                return ((Point)(this.GetValue(RandomCoord1Property)));
+            }
+            set
+            {
+                this.SetValue(RandomCoord1Property, value);
+            }
+        }
+        /// <summary>The random coordinate 2 that is used for lookup in the noise texture.</summary>
+        public Point RandomCoord2
+        {
+            get
+            {
+                return ((Point)(this.GetValue(RandomCoord2Property)));
+            }
+            set
+            {
+                this.SetValue(RandomCoord2Property, value);
+            }
+        }
+        /// <summary>The current frame.</summary>
+        public double Frame
+        {
+            get
+            {
+                return ((double)(this.GetValue(FrameProperty)));
+            }
+            set
+            {
+                this.SetValue(FrameProperty, value);
+            }
+        }
+        public Brush NoiseSampler
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(NoiseSamplerProperty)));
+            }
+            set
+            {
+                this.SetValue(NoiseSamplerProperty, value);
+            }
+        }
+    }
+    /// <summary>An effect that turns the input into blocky pixels.</summary>
+    public class PixelateEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(PixelateEffect), 0);
+        public static readonly DependencyProperty PixelCountsProperty = DependencyProperty.Register("PixelCounts", typeof(Size), typeof(PixelateEffect), new UIPropertyMetadata(new Size(50D, 40D), PixelShaderConstantCallback(0)));
+        public static readonly DependencyProperty BrickOffsetProperty = DependencyProperty.Register("BrickOffset", typeof(double), typeof(PixelateEffect), new UIPropertyMetadata(((double)(0D)), PixelShaderConstantCallback(1)));
+        public PixelateEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/PixelateEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(PixelCountsProperty);
+            this.UpdateShaderValue(BrickOffsetProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The number of horizontal and vertical pixel blocks.</summary>
+        public Size PixelCounts
+        {
+            get
+            {
+                return ((Size)(this.GetValue(PixelCountsProperty)));
+            }
+            set
+            {
+                this.SetValue(PixelCountsProperty, value);
+            }
+        }
+        /// <summary>The amount to shift alternate rows (use 1 to get a brick wall look).</summary>
+        public double BrickOffset
+        {
+            get
+            {
+                return ((double)(this.GetValue(BrickOffsetProperty)));
+            }
+            set
+            {
+                this.SetValue(BrickOffsetProperty, value);
+            }
+        }
+    }
+    /// <summary>An paper sketch effect.</summary>
+    public class SketchGraniteEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(SketchGraniteEffect), 0);
+        public static readonly DependencyProperty BrushSizeProperty = DependencyProperty.Register("BrushSize", typeof(double), typeof(SketchGraniteEffect), new UIPropertyMetadata(((double)(0.003D)), PixelShaderConstantCallback(0)));
+        public SketchGraniteEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/SketchGraniteEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(BrushSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The brush size of the sketch effect.</summary>
+        public double BrushSize
+        {
+            get
+            {
+                return ((double)(this.GetValue(BrushSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(BrushSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>A pencil stroke effect.</summary>
+    public class SketchPencilStrokeEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(SketchPencilStrokeEffect), 0);
+        public static readonly DependencyProperty BrushSizeProperty = DependencyProperty.Register("BrushSize", typeof(double), typeof(SketchPencilStrokeEffect), new UIPropertyMetadata(((double)(0.005D)), PixelShaderConstantCallback(0)));
+        public SketchPencilStrokeEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/SketchPencilStrokeEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(BrushSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The brush size of the sketch effect.</summary>
+        public double BrushSize
+        {
+            get
+            {
+                return ((double)(this.GetValue(BrushSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(BrushSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>Pixel shader that samples the color from an image and draws every odd pixel transparent.</summary>
+    public class TransparentAlternatingPixelsEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(TransparentAlternatingPixelsEffect), 0);
+        public static readonly DependencyProperty TextureSizeProperty = DependencyProperty.Register("TextureSize", typeof(Point), typeof(TransparentAlternatingPixelsEffect), new UIPropertyMetadata(new Point(512D, 512D), PixelShaderConstantCallback(0)));
+        public TransparentAlternatingPixelsEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/TransparentAlternatingPixelsEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(TextureSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The Size of the texture.</summary>
+        public Point TextureSize
+        {
+            get
+            {
+                return ((Point)(this.GetValue(TextureSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(TextureSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>Pixel shader that samples the color from an image and draws every odd pixel transparent.</summary>
+    public class TransparentAlternatingPixelsMultipliedEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(TransparentAlternatingPixelsMultipliedEffect), 0);
+        public static readonly DependencyProperty TextureSizeProperty = DependencyProperty.Register("TextureSize", typeof(Point), typeof(TransparentAlternatingPixelsMultipliedEffect), new UIPropertyMetadata(new Point(512D, 512D), PixelShaderConstantCallback(0)));
+        public TransparentAlternatingPixelsMultipliedEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/TransparentAlternatingPixelsMultipliedEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(TextureSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The Size of the texture.</summary>
+        public Point TextureSize
+        {
+            get
+            {
+                return ((Point)(this.GetValue(TextureSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(TextureSizeProperty, value);
+            }
+        }
+    }
+    /// <summary>Pixel shader that samples the color from an image and draws every odd row transparent.</summary>
+    public class TransparentAlternatingScanlinesEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(TransparentAlternatingScanlinesEffect), 0);
+        public static readonly DependencyProperty TextureSizeProperty = DependencyProperty.Register("TextureSize", typeof(Point), typeof(TransparentAlternatingScanlinesEffect), new UIPropertyMetadata(new Point(512D, 512D), PixelShaderConstantCallback(0)));
+        public TransparentAlternatingScanlinesEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/TransparentAlternatingScanlinesEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(TextureSizeProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        /// <summary>The Size of the texture.</summary>
+        public Point TextureSize
+        {
+            get
+            {
+                return ((Point)(this.GetValue(TextureSizeProperty)));
+            }
+            set
+            {
+                this.SetValue(TextureSizeProperty, value);
+            }
+        }
+    }
+    public class ReflectionEffect : ShaderEffect
+    {
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(ReflectionEffect), 0);
+        public static readonly DependencyProperty ReflectionHeightProperty = DependencyProperty.Register("ReflectionHeight", typeof(Color), typeof(ReflectionEffect), new UIPropertyMetadata(Color.FromArgb(255, 0, 0, 0), PixelShaderConstantCallback(1)));
+        public static readonly DependencyProperty DdxUvDdyUvProperty = DependencyProperty.Register("DdxUvDdyUv", typeof(Color), typeof(ReflectionEffect), new UIPropertyMetadata(Color.FromArgb(255, 0, 0, 0), PixelShaderConstantCallback(6)));
+        public ReflectionEffect()
+        {
+            PixelShader pixelShader = new PixelShader(); string path = System.AppDomain.CurrentDomain.BaseDirectory;
+            pixelShader.UriSource = new Uri(path + "Misc/PsEffects/ReflectionEffect.ps", UriKind.RelativeOrAbsolute);
+            this.PixelShader = pixelShader;
+
+            this.UpdateShaderValue(InputProperty);
+            this.UpdateShaderValue(ReflectionHeightProperty);
+            this.UpdateShaderValue(DdxUvDdyUvProperty);
+        }
+        public Brush Input
+        {
+            get
+            {
+                return ((Brush)(this.GetValue(InputProperty)));
+            }
+            set
+            {
+                this.SetValue(InputProperty, value);
+            }
+        }
+        public Color ReflectionHeight
+        {
+            get
+            {
+                return ((Color)(this.GetValue(ReflectionHeightProperty)));
+            }
+            set
+            {
+                this.SetValue(ReflectionHeightProperty, value);
+            }
+        }
+        public Color DdxUvDdyUv
+        {
+            get
+            {
+                return ((Color)(this.GetValue(DdxUvDdyUvProperty)));
+            }
+            set
+            {
+                this.SetValue(DdxUvDdyUvProperty, value);
+            }
+        }
+    }
+
+    public class GrayscaleEffect : ShaderEffect
+    {
+        private static PixelShader _pixelShader = new PixelShader() { UriSource = new Uri(System.AppDomain.CurrentDomain.BaseDirectory + "Misc/PsEffects/GrayscaleEffect.ps") };
+
+        public GrayscaleEffect()
+        {
+            PixelShader = _pixelShader;
+
+            UpdateShaderValue(InputProperty);
+            UpdateShaderValue(DesaturationFactorProperty);
+        }
+
+        public static readonly DependencyProperty InputProperty = ShaderEffect.RegisterPixelShaderSamplerProperty("Input", typeof(GrayscaleEffect), 0);
+        public Brush Input
+        {
+            get { return (Brush)GetValue(InputProperty); }
+            set { SetValue(InputProperty, value); }
+        }
+
+        public static readonly DependencyProperty DesaturationFactorProperty = DependencyProperty.Register("DesaturationFactor", typeof(double), typeof(GrayscaleEffect), new UIPropertyMetadata(0.0, PixelShaderConstantCallback(0), CoerceDesaturationFactor));
+        public double DesaturationFactor
+        {
+            get { return (double)GetValue(DesaturationFactorProperty); }
+            set { SetValue(DesaturationFactorProperty, value); }
+        }
+
+        private static object CoerceDesaturationFactor(DependencyObject d, object value)
+        {
+            GrayscaleEffect effect = (GrayscaleEffect)d;
+            double newFactor = (double)value;
+
+            if (newFactor < 0.0 || newFactor > 1.0)
+            {
+                return effect.DesaturationFactor;
+            }
+
+            return newFactor;
+        }
+    }
+
+}

BIN
PicView/Misc/PsEffects/BandedSwirlEffect.ps


BIN
PicView/Misc/PsEffects/BandsEffect.ps


BIN
PicView/Misc/PsEffects/BloomEffect.ps


BIN
PicView/Misc/PsEffects/ColorToneEffect.ps


BIN
PicView/Misc/PsEffects/DirectionalBlurEffect.ps


BIN
PicView/Misc/PsEffects/EmbossedEffect.ps


BIN
PicView/Misc/PsEffects/FrostyOutlineEffect.ps


BIN
PicView/Misc/PsEffects/GlassTilesEffect.ps


BIN
PicView/Misc/PsEffects/GloomEffect.ps


BIN
PicView/Misc/PsEffects/GrayscaleEffect.ps


BIN
PicView/Misc/PsEffects/GrowablePoissonDiskEffect.ps


BIN
PicView/Misc/PsEffects/InvertColorEffect.ps


BIN
PicView/Misc/PsEffects/MagnifySmoothEffect.ps


BIN
PicView/Misc/PsEffects/MonochromeEffect.ps


BIN
PicView/Misc/PsEffects/MultiInput_ColorChannelsEffect.ps


BIN
PicView/Misc/PsEffects/OldMovieEffect.ps


BIN
PicView/Misc/PsEffects/PaperFoldEffect.ps


BIN
PicView/Misc/PsEffects/PivotEffect.ps


BIN
PicView/Misc/PsEffects/PixelateEffect.ps


BIN
PicView/Misc/PsEffects/PixelateOutTransitionEffect.ps


BIN
PicView/Misc/PsEffects/RadGradientEffect.ps


BIN
PicView/Misc/PsEffects/ReflectionEffect.ps


BIN
PicView/Misc/PsEffects/RippleEffect.ps


BIN
PicView/Misc/PsEffects/SharpenEffect.ps


BIN
PicView/Misc/PsEffects/SketchGraniteEffect.ps


BIN
PicView/Misc/PsEffects/SketchPencilStrokeEffect.ps


BIN
PicView/Misc/PsEffects/SplinterEffect.ps


BIN
PicView/Misc/PsEffects/StarGeneratorEffect.ps


BIN
PicView/Misc/PsEffects/SwirlEffect.ps


BIN
PicView/Misc/PsEffects/TelescopicBlurPS3Effect.ps


BIN
PicView/Misc/PsEffects/TilerEffect.ps


BIN
PicView/Misc/PsEffects/ToneMappingEffect.ps


BIN
PicView/Misc/PsEffects/ToonShaderEffect.ps


BIN
PicView/Misc/PsEffects/Transition_BandedSwirlEffect.ps


BIN
PicView/Misc/PsEffects/Transition_BlindsEffect.ps


BIN
PicView/Misc/PsEffects/Transition_BloodEffect.ps


BIN
PicView/Misc/PsEffects/Transition_CircleRevealEffect.ps


BIN
PicView/Misc/PsEffects/Transition_CircleStretchEffect.ps


BIN
PicView/Misc/PsEffects/Transition_CircularBlurEffect.ps


BIN
PicView/Misc/PsEffects/Transition_CloudRevealEffect.ps


BIN
PicView/Misc/PsEffects/Transition_CrumbleEffect.ps


BIN
PicView/Misc/PsEffects/Transition_RippleEffect.ps


BIN
PicView/Misc/PsEffects/Transition_WaterEffect.ps


BIN
PicView/Misc/PsEffects/TransparentAlternatingPixelsEffect.ps


BIN
PicView/Misc/PsEffects/TransparentAlternatingPixelsMultipliedEffect.ps


BIN
PicView/Misc/PsEffects/TransparentAlternatingScanlinesEffect.ps


BIN
PicView/Misc/PsEffects/UnderwaterEffect.ps


BIN
PicView/Misc/PsEffects/WaveWarperEffect.ps


+ 7 - 3
PicView/PicView.csproj

@@ -174,11 +174,14 @@
       <SubType>Designer</SubType>
     </Page>
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="Misc\PsEffects\**">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
   <PropertyGroup>
-    <PostBuildEvent>
-    </PostBuildEvent>
     <FileVersion>0.9.8.5</FileVersion>
-    <SignAssembly>false</SignAssembly>
+    <SignAssembly>true</SignAssembly>
     <PackageLicenseFile></PackageLicenseFile>
     <Copyright>Ruben Hyldgaard Negendahl</Copyright>
     <PackageProjectUrl>https://github.com/Ruben2776/PicView</PackageProjectUrl>
@@ -201,4 +204,5 @@
   <Target Name="AfterBuild">
   </Target>
   -->
+
 </Project>

+ 31 - 32
PicView/Windows/Effects.xaml

@@ -5,7 +5,7 @@
     xmlns:uc="clr-namespace:PicView.UserControls"
     Title="HLSL Picture FX"
     Width="555"
-    Height="556"
+    Height="565"
     FontFamily="/PicView;component/Resources/fonts/#Aller"
     Foreground="{StaticResource MainColorBrush}"
     Style="{DynamicResource MyWindowStyle}">
@@ -101,7 +101,7 @@
                     <WrapPanel Margin="10,5" Orientation="Horizontal">
 
                         <RadioButton
-                            x:Name="Negative"
+                            x:Name="NegativeButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -109,7 +109,7 @@
                             Content="Negative Colors" />
 
                         <RadioButton
-                            x:Name="blackwhite"
+                            x:Name="GrayscaleButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -117,7 +117,7 @@
                             Content="Black &amp; White" />
 
                         <RadioButton
-                            x:Name="ColorTone"
+                            x:Name="ColorToneButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -125,7 +125,7 @@
                             Content="Color Tone" />
 
                         <RadioButton
-                            x:Name="OldMovie"
+                            x:Name="OldMovieButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -133,7 +133,7 @@
                             Content="Old Movie" />
 
                         <RadioButton
-                            x:Name="Bloom"
+                            x:Name="BloomButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -141,7 +141,7 @@
                             Content="Bloom" />
 
                         <RadioButton
-                            x:Name="Gloom"
+                            x:Name="GloomButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -149,7 +149,7 @@
                             Content="Gloom" />
 
                         <RadioButton
-                            x:Name="Monochrome"
+                            x:Name="MonochromeButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -157,7 +157,7 @@
                             Content="Monochrome" />
 
                         <RadioButton
-                            x:Name="Wavewarper"
+                            x:Name="WavewarperButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -165,7 +165,7 @@
                             Content="Wave Warper" />
 
                         <RadioButton
-                            x:Name="Underwater"
+                            x:Name="UnderwaterButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -173,7 +173,7 @@
                             Content="Underwater" />
 
                         <RadioButton
-                            x:Name="BandedSwirl"
+                            x:Name="BandedSwirlButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -181,7 +181,7 @@
                             Content="Banded Swirl" />
 
                         <RadioButton
-                            x:Name="Ripple"
+                            x:Name="RippleButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -189,7 +189,7 @@
                             Content="Ripple" />
 
                         <RadioButton
-                            x:Name="RippleAlt"
+                            x:Name="RippleAltButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -197,7 +197,7 @@
                             Content="Ripple Alt" />
 
                         <RadioButton
-                            x:Name="Blur"
+                            x:Name="BlurButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -205,7 +205,7 @@
                             Content="Blur" />
 
                         <RadioButton
-                            x:Name="DirectionalBlur"
+                            x:Name="DirectionalBlurButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -213,7 +213,7 @@
                             Content="Directional Blur" />
 
                         <RadioButton
-                            x:Name="TelescopicBlur"
+                            x:Name="TelescopicBlurButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -221,7 +221,7 @@
                             Content="Telescopic Blur" />
 
                         <RadioButton
-                            x:Name="Pixelate"
+                            x:Name="PixelateButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -229,7 +229,7 @@
                             Content="Pixelate" />
 
                         <RadioButton
-                            x:Name="Embossed"
+                            x:Name="EmbossedButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -237,7 +237,7 @@
                             Content="Embossed" />
 
                         <RadioButton
-                            x:Name="SmoothMagnify"
+                            x:Name="SmoothMagnifyButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -245,7 +245,7 @@
                             Content="Smooth Magnify" />
 
                         <RadioButton
-                            x:Name="Pivot"
+                            x:Name="PivotButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -253,7 +253,7 @@
                             Content="Pivot" />
 
                         <RadioButton
-                            x:Name="Paperfold"
+                            x:Name="PaperfoldButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -261,7 +261,7 @@
                             Content="Paper fold" />
 
                         <RadioButton
-                            x:Name="PencilSketch"
+                            x:Name="PencilSketchButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -270,7 +270,7 @@
 
 
                         <RadioButton
-                            x:Name="Sketch"
+                            x:Name="SketchButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -278,7 +278,7 @@
                             Content="Sketch" />
 
                         <RadioButton
-                            x:Name="Tonemapping"
+                            x:Name="TonemappingButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -287,16 +287,15 @@
 
 
                         <RadioButton
-                            x:Name="FrostyOutline"
+                            x:Name="FrostyOutlineButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
                             Background="{StaticResource BackgroundColorBrush}"
                             Content="Frosty Outline" />
 
-
                         <RadioButton
-                            x:Name="Bands"
+                            x:Name="BandsButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -305,7 +304,7 @@
 
 
                         <RadioButton
-                            x:Name="GlasTile"
+                            x:Name="GlasTileButton"
                             MinWidth="125"
                             Margin="5"
                             Padding="10"
@@ -313,10 +312,10 @@
                             Content="Glass Tile" />
 
                     </WrapPanel>
-                    <Button
-                        x:Name="RemoveEffects"
-                        Content="Remove Effects"
-                        Style="{StaticResource MetroAlphaFlatButton}" />
+
+                    <Label HorizontalAlignment="Center" Content="Click button to add specified shader effect to image" />
+                    <Label HorizontalAlignment="Center" Content="Uncheck to remove effect" />
+
                 </StackPanel>
             </ScrollViewer>
         </Border>

+ 333 - 0
PicView/Windows/Effects.xaml.cs

@@ -2,6 +2,7 @@
 using System.Windows;
 using System.Windows.Input;
 using static PicView.Fields;
+using PicView.HlslEffects;
 
 namespace PicView.Windows
 {
@@ -29,7 +30,83 @@ namespace PicView.Windows
 
             TitleBar.MouseLeftButtonDown += delegate { DragMove(); };
 
+            NegativeButton.Click += Negative;
+            NegativeButton.Unchecked += Remove_Effects;
 
+            GrayscaleButton.Click += GraySceale;
+            GrayscaleButton.Unchecked += Remove_Effects;
+
+            ColorToneButton.Click += ColorToneEffect;
+            ColorToneButton.Unchecked += Remove_Effects;
+
+            OldMovieButton.Click += OldMovieEffect;
+            OldMovieButton.Unchecked += Remove_Effects;
+
+            BloomButton.Click += Bloom;
+            BloomButton.Unchecked += Remove_Effects;
+
+            GloomButton.Click += Gloom;
+            GloomButton.Unchecked += Remove_Effects;
+
+            MonochromeButton.Click += Monochrome;
+            MonochromeButton.Unchecked += Remove_Effects;
+
+            WavewarperButton.Click += WaveWarperEffect;
+            WavewarperButton.Unchecked += Remove_Effects;
+
+            UnderwaterButton.Click += UnderWaterEffect;
+            UnderwaterButton.Unchecked += Remove_Effects;
+
+            BandedSwirlButton.Click += BandedSwirlEffect;
+            BandedSwirlButton.Unchecked += Remove_Effects;
+
+            RippleButton.Click += RippleEffect1;
+            RippleButton.Unchecked += Remove_Effects;
+
+            RippleAltButton.Click += RippleEffect2;
+            RippleAltButton.Unchecked += Remove_Effects;
+
+            BlurButton.Click += Poison_blur;
+            BlurButton.Unchecked += Remove_Effects;
+
+            DirectionalBlurButton.Click += Dir_blur;
+            DirectionalBlurButton.Unchecked += Remove_Effects;
+
+            TelescopicBlurButton.Click += Teleskopisk_blur;
+            TelescopicBlurButton.Unchecked += Remove_Effects;
+
+            PixelateButton.Click += PixelateEffect;
+            PixelateButton.Unchecked += Remove_Effects;
+
+            EmbossedButton.Click += Embossed;
+            EmbossedButton.Unchecked += Remove_Effects;
+
+            SmoothMagnifyButton.Click += MagnifySmoothEffect;
+            SmoothMagnifyButton.Unchecked += Remove_Effects;
+
+            PivotButton.Click += PivotEffect;
+            PivotButton.Unchecked += Remove_Effects;
+
+            PaperfoldButton.Click += PaperFoldEffect;
+            PaperfoldButton.Unchecked += Remove_Effects;
+
+            PencilSketchButton.Click += SketchPencilStrokeEffect;
+            PencilSketchButton.Unchecked += Remove_Effects;
+
+            SketchButton.Click += Sketch;
+            SketchButton.Unchecked += Remove_Effects;
+
+            TonemappingButton.Click += ToneMapping;
+            TonemappingButton.Unchecked += Remove_Effects;
+
+            BandsButton.Click += bands;
+            BandsButton.Unchecked += Remove_Effects;
+
+            GlasTileButton.Click += GlasTileEffect;
+            GlasTileButton.Unchecked += Remove_Effects;
+
+            FrostyOutlineButton.Click += FrostyOutlineEffect;
+            FrostyOutlineButton.Unchecked += Remove_Effects;
         }
 
         #region Keyboard Shortcuts
@@ -89,6 +166,262 @@ namespace PicView.Windows
 
         #endregion
 
+        #region HLSL Shader Effects
+
+        private void Remove_Effects(object sender, RoutedEventArgs e)
+        {
+            mainWindow.img.Effect = null;
+        }
+
+        private void Negative(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new InvertColorEffect();
+            }
+            else NegativeButton.IsChecked = false;
+            
+        }
+
+        private void GraySceale(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new GrayscaleEffect();
+            }
+            else GrayscaleButton.IsChecked = false;
+        }
+
+        private void ColorToneEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new ColorToneEffect();
+            }
+            else ColorToneButton.IsChecked = false;
+
+        }
+
+        private void RippleEffect1(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new Transition_RippleEffect();
+            }
+            else RippleButton.IsChecked = false;
+        }
+
+        private void RippleEffect2(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new RippleEffect();
+            }
+            else RippleAltButton.IsChecked = false;
+        }
+
+        private void BandedSwirlEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new BandedSwirlEffect();
+            }
+            else BandedSwirlButton.IsChecked = false;
+        }
+
+        private void Monochrome(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new MonochromeEffect();
+            }
+            else MonochromeButton.IsChecked = false;
+
+        }
+
+        private void Swirl(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new SwirlEffect();
+            }
+            else BandedSwirlButton.IsChecked = false;
+        }
+
+        private void Bloom(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new BloomEffect();
+            }
+            else BloomButton.IsChecked = false;
+        }
+
+        private void Gloom(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new GloomEffect();
+            }
+            else GloomButton.IsChecked = false;
+        }
+
+        private void ToneMapping(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new ToneMappingEffect();
+            }
+            else TonemappingButton.IsChecked = false;
+        }
+
+        private void Teleskopisk_blur(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new TelescopicBlurPS3Effect();
+            }
+            else TelescopicBlurButton.IsChecked = false;
+        }
+
+        private void Poison_blur(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new GrowablePoissonDiskEffect();
+            }
+            else BlurButton.IsChecked = false;
+        }
+
+        private void Dir_blur(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new DirectionalBlurEffect();
+            }
+            else DirectionalBlurButton.IsChecked = false;
+        }
+
+        private void bands(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new BandsEffect();
+            }
+            else BandsButton.IsChecked = false;
+        }
+
+        private void Embossed(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new EmbossedEffect();
+            }
+            else EmbossedButton.IsChecked = false;
+        }
+
+        private void GlasTileEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new GlassTilesEffect();
+            }
+            else GlasTileButton.IsChecked = false;
+        }
+
+        private void MagnifySmoothEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new MagnifySmoothEffect();
+            }
+            else SmoothMagnifyButton.IsChecked = false;
+
+        }
+
+        private void PaperFoldEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new PaperFoldEffect();
+            }
+            else PaperfoldButton.IsChecked = false;
+        }
+
+        private void PivotEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new PivotEffect();
+            }
+            else PivotButton.IsChecked = false;
+        }
+
+        private void UnderWaterEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new UnderwaterEffect();
+            }
+            else UnderwaterButton.IsChecked = false;
+        }
+
+        private void WaveWarperEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new WaveWarperEffect();
+            }
+            else WavewarperButton.IsChecked = false;
+        }
+
+        private void FrostyOutlineEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new FrostyOutlineEffect();
+            }
+            else FrostyOutlineButton.IsChecked = false;
+        }
+
+        private void OldMovieEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new OldMovieEffect();
+            }
+            else OldMovieButton.IsChecked = false;
+        }
+
+        private void PixelateEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new PixelateEffect();
+            }
+            else PixelateButton.IsChecked = false;
+        }
+
+        private void Sketch(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new SketchGraniteEffect();
+            }
+            else SketchButton.IsChecked = false;
+        }
+
+        private void SketchPencilStrokeEffect(object sender, RoutedEventArgs e)
+        {
+            if (mainWindow.img.Effect == null)
+            {
+                mainWindow.img.Effect = new SketchPencilStrokeEffect();
+            }
+            else PencilSketchButton.IsChecked = false;
+        }
+
+        #endregion
+
 
     }
 }