What's New in Graphics for 4.0 Beta 2

Last beta I mentioned we were saving the best for Beta 2 so thank you for waiting 🙂 New Features 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…


WPF3D Lighting and Shading

We use the standard fixed-function Blinn-Phong model. You can read up on all of the equations here at MSDN. If you have a Tier 2 card, we actually do our lighting in a vertex shader. If you don’t have a Tier 2 card, we do the lighting on the CPU. Why not just use D3D9’s…


Transparent DiffuseMaterials and Depth Sorting

I hinted at this a long time ago and then forgot to follow up, whoops! As the old post says, DiffuseMaterial writes to the depth buffer. This means if you draw one diffuse model and then draw another diffuse model behind it, the card knows not to draw the second one on top of the…


3.5 SP1 Software 3D Leak Fix Available

In 3.5 SP1 it was really easy to leak memory when doing software 3D rendering involving a VisualBrush or DrawingBrush. We got this complaint many times online and in person. Unfortunately, there is no work around. It’s described in “Issue 2” from this new Knowledge Base article. The fix should also be in 4.0 Beta…


3D Hit Testing

How to do 3D hit testing has come up a bit recently in the forums but essentially it isn’t any different than 2D hit testing which is described on MSDN here. You can either start with a 2D point on the Viewport3D or a 3D point on a Visual3D. Starting at the Viewport3D level is…


Transforming Bounds

Many haven’t realized this, but we added the ability to transform between 2D and 3D Visuals back in 3.5. This is handy if you need to draw 2D content around your 3D object or if you want to know the 2D position of a 3D point without doing a hit test. The methods are: GeneralTransform3DTo2D…


D3DImage and Software Rendering

If the WPF render thread is doing software rendering, D3DImage will not show up. I don’t think we specifically called this out in the documentation so it can come as a surprise when you first encounter it. Off the top of my head, here are times when the render thread is in software: RenderCapability.Tier ==…


.NET 3.5 SP1 Graphics @ Channel 9

Sorry for the lack of updates, but we’ve been pretty busy. On what, you may ask? Our PM, David Teitlebaum, just did a video on Channel 9 showing off the new features. He starts by covering interactive 2D on 3D and improved layered window support, both of which were in 3.5, and he finishes with…


Blender to XAML Exporter Updated

Robert Hogue has updated the Python script with a bunch of new features. See this forum post for the instructions, tutorials, and demos! — Jordan


.NET 3.5 has been released!

Yesterday, .NET Framework 3.5 and Visual Studio 2008 went live on MSDN. You can see what’s new in both here and download them here. Since this is a graphics blog, here are the graphics-specific changes of note in 3.5:New Graphics Features UIElement3D Interactive 2D on 3D: Viewport2DVisual3D Transformation services on Visual3D BitmapSource.DecodeFailed event HwndTarget.RenderMode to enable…