0

I've been working on a project, in WPF/C#, at work which uses quite a few animations. As a whole the project is going very well, and we've managed to make the animations efficient and impressive.

The problem is, we had to remove drop shadows to make that a reality. This has been met with a bit of resistance, as drop shadows on our title text generally look nicer. Now that we are getting close to the wrap-up stage I was asked to take another look at drop shadows and see if I can't make a workable solution. I tried the standard drop shadow effect, which is notoriously bad, and the Windows.Themes.x.DropShadowChrome effect which is more lightweight but still not great.

I am currently approaching the issue by trying to make a custom control which is using a template selector to basically remove the drop shadows during animation, and things are going well enough but I was curious about making my own pixel shader. Once upon a time I learned HLSL, and I have made a few shaders before but try as I might I cannot seem to make a single pass (a requirement of wpf) drop shadow.

I'm honestly not even sure such a shader is possible and I couldn't find a definitive yes or no online. Anyone have any insight to the possibility/method of doing something like this?

Jonesopolis
  • 25,034
  • 12
  • 68
  • 112
BlindGarret
  • 155
  • 7
  • 2
    too much background story, better ask like this: "how can I do xxx? I tried xxx, but failed, the error is xxx, at line xxx". – kennyzx Jan 22 '15 at 15:45
  • Sorry, wanted to make sure enough context was given. The TLDR version is the title, "Is a single pass drop shadow shader possible in WPF using HLSL?" and i suppose as an addendum, "If so what technique would you have to explore?" – BlindGarret Jan 22 '15 at 15:47
  • Is your project 2D or 3D? Could you provide a screenshot of your current state and where the shadow should be applied to? – Gnietschow Jan 25 '15 at 10:28

0 Answers0