Chromatic Aberration Effect with WPF, HLSL, and Lena

Chromatic aberration can be intentionally added as an artistic effect to production video and design. I have wanted to create a pixel shader effect to do this for some time. When I eventually sat down with Walt Ritscher’s Shazzam shader-effect tool the code I came up with was so simple I was disappointed I’d put off writing it for so long.

ChromaticAberrationWPFLike all effects this will work with controls and UI elements, images and video. You set the R, G and B offsets as ‘points’ (so they have an X and Y offset). The RGB offsets can be animated (they’re dependency properties after all). Small offset values tend to look best.

You can download the source and sample application here: LearnWPF.ChromaticAberration.zip (112.46 kb)

Comments

alvinashcraft.com
Pingback from alvinashcraft.com

Dew Drop – October 20, 2010 | Alvin Ashcraft's Morning Dew

20/10/2010 6:45:41 AM
Shekhar
That’s a nice effect. Will try in some of my animations in WPF.
20/10/2010 8:11:44 PM
Microsoft Weblogs
Windows Client Developer Roundup 047 for 10/25/2010

This is Windows Client Developer roundup #47. The Windows Client Developer Roundup aggregates information

24/10/2010 9:55:13 PM
pooran
Isn’t this the same technology used for 3D?
25/10/2010 5:58:31 AM
askamigos.shikshik.org
Pingback from askamigos.shikshik.org

Lena ritscher | Askamigos

27/07/2011 8:42:23 AM