We’re getting close to a release of the next version of Shazzam. This is the first in a number of articles describing the new features.
Built on .NET 4.0
The latest version of .NET shipped in April. There is one key feature in WPF that we had to include in Shazzam 1.3.
The PixelShader class now accepts Pixel Shader 3.0 shaders when your hardware supports them. Important: There is no software rendering for PS 3.0. For example, you won’t see PS 3.0 Effects over Remote Desktop, when printing, in RenderTargetBitmap, etc… – WPF3D Team Blog
Yes, you can now target Pixel Shader 3 in your shader!
What do I get with the Pixel Shader 3. specification?
For starters, you get a lot more instructions in your HLSL. What this means to you is that you can write more lines of HLSL before getting the dreaded “Instructions Limit Exceeded” compile error. Here’s a list of the differences between the two specs. Not all these feature may be support in WPF. We are still learning more about the WPF coverage.
|
Pixel shader version |
2.0 |
3.0[2] |
|
Dependent texture limit |
8 |
Unlimited |
|
Instruction slots |
32 + 64 |
≥ 512 |
|
Executed instructions |
32 + 64 |
65536 |
|
Texture instruction limit |
32 |
Unlimited |
|
Position register |
No |
Yes |
|
Texture indirections |
4 |
No Limit |
|
Interpolated registers |
2 + 8 |
10 |
|
Instruction predication |
No |
Yes |
|
Index input registers |
No |
Yes |
|
Temp registers |
12 |
32 |
|
Constant registers |
32 |
224 |
|
Gradient instructions |
No |
Yes |
|
Loop count register |
No |
Yes |
|
Dynamic flow control |
No |
24 |
|
|
Read more at http://msdn.microsoft.com/en-us/library/bb219846(VS.85).aspx
New Settings for compiler
The Settings Pane has changed to accommodate this change. When choosing the target framework you can pick WPF PS3, WPF PS2 or Silverlight.
Bad news for the Silverlight developers though. You don’t get to move to Pixel shader 3 yet.
Ship date: Shazzam 1.3 will be out by mid June.