All you ever wanted to know about WPF and Silverlight and XAML, Microsoft Expression Studio and more.

WPF, Experiments with the CodePlex Shader Library and Desktop UI Fun

Quoting Mike Taulty's blog:

"I took the Pixel Shader library from CodePlex which has a bunch of WPF 3.5 Service Pack 1 Pixel Shaders and I built a little toy application from it.

What the application does is to try and enumerate all the  ShaderEffects in the library and then take a picture of your desktop and apply the effects to it one at a time.

It does this by overlaying a full screen, top-most window which it then paints with an image which is a copy of the desktop. The current effect is then applied to that image.

You can see some examples below;

imageimage image

That's a snapshot of my desktop with swirl, ripple and zoom blur applied.

In order to move to the next effect you hit SPACE and in order to quit the application you hit ESC.

For each effect I make an attempt to reflect on to the effect and try and guess what properties it has that might be parameters to the effect. Specifically, I try and find double, int, Color, Point and Size properties.

For each of those, I dynamically create a control which will bind to that property ( mostly using sliders ) so that you can manipulate that property whilst the effect is on the screen.

In quite a few places I end up using UI like this;

image

which is a bit clumsy but what it's saying is;

I have no idea what a sensible max value is for the sliders below so I've guessed at "0 to 1" whereas if "0 to 100" or "0 to 360" seems to make more sense to you then tick that radio button to use that maximum value instead

I've dropped the source code here for download. Unusually, I've included the binaries as well to try and avoid you having to build them yourself. "

» Similar Posts

  1. What's Missing from Vista?
  2. The Future of Expression Blend
  3. Creating a Simple TV Listing Viewer Application with WPF 3.5 SP1 and the new DataGrid Control

Comments are closed