Answered by:

Losing Anti-Aliasing on a Rotated Border when DropShadowEffect Applied

Question

I have a rotated (2 degrees) Border, stroked with a solid color and no fill. I have applied a drop shadow effect. The problem/odd thing is that the border is no longer anti-aliased! It is not smooth. I am using .NET 3.5 SP1 (obviously since I am using an effect and not a BitmapEffect).

What's weird is that if I go in and change the ShadowDepth in the VS 2008 designer, it all of a sudden anti-aliases the Border, but when I build it, it flashes back to the un-anti-aliased (and ugly) Border in both the running application and the VS 2008 designer.

What is even weirder is that my fellow developer doesn't see this behavior ... and he has SP1 of .NET 3.5 installed as well. I have installed the latest video drivers on my machine ... and that didn't help at all. I have a 3 monitor setup with an NVIDIA GeForce 7300GT for two monitors and a NVIDIA GeForce 6200 for my third monitor.

Answers

Apologies for not seeing this thread earlier, I'm not sure how I missed it. This isn't a driver issue, it's a bug in the platform that was fixed for the next version. Some DirectX rendering state wasn't being set correctly, so the rendered output of the Effect could vary between looking aliased and anti-aliased, depending on what else was being rendered in the application. It's unfortunate that we were unable to fix it before we initially shipped the Effects, but it's a tricky thing to run into since if you render something that is anti-aliased (Button, text, etc) inside the Effect, the state will be set-up correctly. That's the best workaround until the next version ships, since most common scenarios will use Effects in this manner anyway. This bug only affects the built-in hardware-accelerated DropShadow- and BlurEffect, not the custom ShaderEffects or any Effect rendering in software.

I cannot reproduce this issue with my stale integrated video card (Intel(R) 82865G Graphics Controller).I've heard that some of the GeForce family video card has problem correctly rendering WPF content, but updating the video driver could mostly solve this problem, could you please check if the newly updated driver is available for the your card?

Apologies for not seeing this thread earlier, I'm not sure how I missed it. This isn't a driver issue, it's a bug in the platform that was fixed for the next version. Some DirectX rendering state wasn't being set correctly, so the rendered output of the Effect could vary between looking aliased and anti-aliased, depending on what else was being rendered in the application. It's unfortunate that we were unable to fix it before we initially shipped the Effects, but it's a tricky thing to run into since if you render something that is anti-aliased (Button, text, etc) inside the Effect, the state will be set-up correctly. That's the best workaround until the next version ships, since most common scenarios will use Effects in this manner anyway. This bug only affects the built-in hardware-accelerated DropShadow- and BlurEffect, not the custom ShaderEffects or any Effect rendering in software.