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.
Like 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
This is Windows Client Developer roundup #47. The Windows Client Developer Roundup aggregates information
Lena ritscher | Askamigos
Dew Drop – October 20, 2010 | Alvin Ashcraft's Morning Dew