Robotic Pandas

On abstractions for building next generation user interfaces

Announcing Bling 3!

Posted by mcdirmid on 27/07/2009

I’d like to announce a newly rewritten release of Bling with many improvements and exciting new features. Bling is a novel experiment in how WPF/UI programming can be enhanced via a lightweight domain-specific language hosted completely within C#. Bling basically changes the meaning of statements and expressions to do more that is otherwise possible with normal values in C#; e.g., a + b no longer means add the value of “a” to the value of “b,” but rather it creates tree that we can then transform into a databinding relationship, HLSL code, and so on. We exploit this to reduce or completely UI boilerplate code; e.g., no more value converters, no more HLSL code, no more C# shader classes, etc…Bling 3 goes farther with this style of programming through the addition of lifted functions (so f(a) also creates a tree!). For more details, see my blog.

New features in Bling 3.0:

  • Improved support for multiple forms in lighting in pixel shaders reusing WPF3D abstractions when possible. Now a lighting effect can be added to a widget by specifying a WPF3D light, a material (similar to but not a WPF3D material), a normal map and/or a height map loaded from a texture (some kinds of lights require an eye position). Lighting effects can be combined via addition. WPF shader examples:

clip_image002 clip_image004clip_image006 clip_image008

  1. Normal mapped diffuse material + red specular material point light effect.
  2. Glass material + point light effect (also normal mapped).
  3. Diffraction material + point light effect (again normal mapped).
  4. Diffuse material + point light effect with parametric normals (computed vs. loaded from an image).
  • Pixel-level transition abstractions that support composition. Example:


Intermediate progress of a ripple + sin transition composed via Min (take the min color from each transition’s result, where start and end are the same).

  • Hacked prototype-quality WPF-friendly web browser that supports transformations and pixel shader effects. Browser will refresh every 100 milliseconds, so flash animations will work if a bit choppy. Link clicking is supported, but not keyboard input (need more interop code). Example:


Paper normal mapped browser navigated to Bling’s codeplex page.

  • Simplified physics engine (more examples in the future).
  • Initial experimental support for DirectX 10, focusing right now on parametric surfaces. DirectX compositions look very much like Bling WPF pixel shaders and can refer directly to WPF dependency properties (just like a WPF pixel shader can). Example:

clip_image013 clip_image015 clip_image017 clip_image019


  1. A sphere, no distortion
  2. A sphere + a egg crate distortion
  3. (2) with more magnitude
  4. (3) with more frequency
  5. (4) with less magnitude + the WPF sliders that are controlling it all.


  • Bling 3 is not backwards compatible with the previous version of Bling. Existing code requires porting.


  • Work on DirectX abstractions (right now we just have a start).
  • Would like to support Silverlight 3.

3 Responses to “Announcing Bling 3!”

  1. Glad to see you’re still iterating on this.

    • mcdirmid said

      We’ve been busy this summer. The code in the codeplex SVN repository is very much evolving daily, so definitely stay tuned! I expect that will take the rest of the summer to find the right kind of abstractions for DirectX.

  2. Tadej Fius said

    Well i just found out about this Bling thing, its great !!! I can throw away my quasi scripting now 😛

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: