What’s New in Graphics for 4.0 Beta 1

.NET 4.0 Beta 1 was released a few weeks ago and there’s a lot to it that you can read about elsewhere so I thought I would just stick to what’s changed for WPF graphics. These are the biggest things of note:

  • RenderOptions.ClearTypeHint: If WPF renders text into a potentially transparent surface (e.g. a layered window like a menu or popup) we use grayscale anti-aliasing instead of ClearType because if the transparent surface is blended with another transparent surface, the ClearType will get messed up. Now with ClearTypeHint you can tell us to use ClearType and we’ll trust you that things aren’t transparent.
  • The BitmapEffect classes are now no-ops. They are still there so your apps will compile but don’t expect them to do anything.
  • The default RenderOptions.BitmapScalingMode (Unspecified) is now Linear instead of Fant. If you still want Fant, you can re-enable it.
  • Pixel Shader 2.0 is now required for hardware acceleration. Yes, if your card was Tier 1 but did not have PS 2.0 it is now Tier 0.
  • The memory leak that was easy to hit with software 3D has been fixed. I already mentioned this.
  • A common VisualBrush.Visual disconnect crash has been fixed. It’s in the same KB article as the memory leak.

That’s not much but that’s because we’ve been saving things for Beta 2. Stay tuned!

-- Jordan

Comments (10)
  1. Why have you disabled bitmap effects? Some of us still deploy components that target WPF 3.0. Conditional compilation with XAML isn’t really possible, so this makes our lives harder.

    Have you even provided an Effect-based replacement for the OuterGlowBitmapEffect?

  2. jdavis says:

    What about adding WARP10 software based pixel shaders?  Then you could have pixel shaders run in partial trust xbaps.

  3. zer0mus says:

    BitmapEffects were disabled because their performance is terrible and the way they were designed was holding us back. We marked them as deprecated in the last release as a warning. No, there is no built-in replacement for OuterGlow so you’d need to make your own either with Effect or a custom BitmapSource.

    .NET 4.0 is a side-by-side release so you have to actually target 4.0 during compilation. If you load a 3.0 component into a 4.0 app I’m not sure what behavior you’ll get though I’m guessing your 3.0 component will get 4.0 behavior.

  4. zer0mus says:

    We don’t use WARP because we’re still D3D9 based and WARP/D3D10 does not support XP, of course.

  5. So, you have disabled a feature without actually providing a replacement that people can use. Saying "make your own" is a cop-out and presumably any custom shader won’t work in an xbap.

    You’ve dropped the ball.

  6. jdavis says:

    Saying WARP10 cannot run on XP is just nuts.  It’s a pure software renderer.  This is purely a marketing choice on the part of MS.

  7. zer0mus says:

    It doesn’t run on XP because WARP10 is a D3D10 driver implementation thus you need the D3D10 runtime to use it. Now one could implement a good chunk on D3D9 on top of it, but that’s a lot of work and WARP probably uses some Vista+ APIs internally.

  8. zer0mus says:

    Correct, if you need XBAP support shaders won’t work. I was trying to explain your options rather than copping out 🙂

    Removing BitmapEffects wasn’t something we did lightly. We investigated to make sure it wouldn’t impact many customers but that doesn’t mean that no one is affected, of course. In the end, we had to do what was best for the product.

  9. And you could have minimized the impact by having some intern write an OuterGlowEffect so that vendors can make the switch. It’s the control vendors you should worry about; they use your platform to create another platform on which applications are created. Though they don’t tend to publish applications themselves, their work is published in thousands.

  10. jdavis says:

    The upcoming pixel shader 3.0 support needs to run in partial trust xbaps.  Otherwise, I’m afraid I will be forced the use O3D instead for my upcoming "killer app" 🙂

Comments are closed.

Skip to main content