Here is one of the coolest applications of WPF ever: Bling. It’s a completely new way to leverage the WPF platform for high-performance graphics development. Bling experiments with a programming model that combines the ease of programming provided by a retained graphics model with the flexibility and performance provided by custom pixel and vertex shaders. Shaders are expressed in pure C# code rather than HLSL code. At run-time, the C#-encoded shaders are dynamically translated into HLSL code that is then compiled into DirectX 10 shaders. You get the speed of shaders running on the GPU without the HLSL goo, hooray!
Glass shader effect in Bling. It runs really fast.
To give you an idea of what pixel shader code looks like in Bling, here’s a simple lens effect:
Here’s what the shader looks like:
Lens pixel shader in Bling.
In addition, the UI is expressed by sophisticated declarative constraints that maintain dynamic relationships in the UI without event handling. But that’s a topic for another post. Just go download Bling.