Jul 25, 2008

Wave Reflection Shader Effect in WPF

Posted by rravuri

WPF 3.5 SP1 (Beta) introduces the ability to apply Pixel Shader effects to any UIElement, these will executed by GPU by compatible cards. Greg Schechter's blog is an excellent place to start learning about these features.

Shader Effects have long been used in rendering pipeline, to create great special effects. And nowadays are used by almost every game engine to enhance the visual aspects of the game play.

Another good tutorial and Check out the HLSLTester code , it is helpful in creating new effects here. I have used the Shader code from this page and added some dynamic properties to create the following effect.


Download the full code for this demo from here.

Download the compiled effect.

kick it on DotNetKicks.com


KiwiDave said...

ok , so if this is in hardware now, why is the cpu doing so much work. shouldnt the animation also be part of the shader?

Anonymous said...

There is a free WPF pixel shader utility available that simplifies editing and testing shaders.
Learn more about Shazzam