I’m rebranding the signal library as Bling WPF since it now contains support for expressing pixel shaders in C#. The release I’m putting out today polishes the pixel shader implementation that I released last week and fixes lots of outstanding issues:
- I’m not using Microsoft naming conventions; all names begin with a capital. This was a serious sticking point for many potential users.
- I renamed all the helper classes based on whether they were for signals or shaders. Example, DoubleSg is a signal that lifts doubles while FloatSh is a shader value that lifts floats.
- I added Angle and Percentage types to better represent angles and percentages that are encoded as dependency properties. This was getting on my nerves: why do I have to convert an angle to radians, call Cosine, and then convert it back to degrees so I can plop it into a WPF dependency property? Anyways, this should make WPF programming a bit higher level although it borders on unit types. To get a percent, call Percent on a value or double signal; e.g., 100.Percent() or 57.Percent(). To get an angle, there are three methods—90.Degrees(), .5.PI(), and (.5 * Math.PI).Radians() all evaluate to a 90 degree angle.
- Most HLSL 2.0 shader functions should be supported now on both scalars and vectors where appropriate. I also made it easier to define zero argument shaders (use LiftedShaderEffect.Apply) and one argument shaders (call Shader on the double/color/point signal that you want to be bound).