This wikipedia article has a great chart on the differences between the different shader models. WPF 4.0 increases what you can do with effects because it now allows you to target Pixel Shader 3.0. So, what can you do about this? You could optimize the HLSL so that your effect code goes under the limits … but if you notice in the errors above (these particular errors are for the Saturation effect) … you will see that I am significantly above the number of allowed arithmetic instruction slots (100 versus 64). Those errors mean that you’ve exceeded the limitations of Pixel Shader 2.0 … which is what WPF 3.5 SP1 targets for pixel shader effects. error X5609: Compiled shader code uses too many instruction slots (102).error X5608: Compiled shader code uses too many arithmetic instruction slots (100).fx file (through the Shader Effects BuildTask and Templates), it would give me the following two errors: Why is that? Whenever fxc.exe would compile the. If you were watching closely, you will have noticed that I have not (to date) implemented the Hue, Saturation, Color, and Luminosity blend mode effects. Hue, Saturation, Color, and Luminosity: Where Are You?
However, it is now only with WPF 4.0 (currently Beta 2) … that I can actually implement all the blend modes. I’ve been toying with and working on this blend mode library of mine for some time now (see posts 1, 2, 3, 4, 5).