October 13, 2011

GLSL Cubic Lens Distortion

Few years ago I ported HLSL Cubic Lens Distortion shader made by a really nice guy François Tarlier. I slightly modified it, but the algorithm basically is the same one used in SynthEyes.
I encourage to visit François homepage and blog for Blender, AfterFX, compositing, VFX and mathcmoving related stuff. He is a former Environment and VFX artist at Ubisoft hehe.

Here are few screenshots of the shader in action:

distorted w chromatic abberration and slight blurring at edges:

lens distortion & my BPCEM reflection scene:

a screenshot in my real-time snowflake growth demo with lens distortion shader applied:

more info about the snowflake project HERE

download link to snowflake demo blend (for Blender 2.5x & 2.6x):

download link to blend file for lens distortion demo (for Blender 2.5x & 2.6x):

controls: mouse&WASD - camera movement
1 - disables the filter
2 - enables the filter

glsl fragment shader:

No comments:

Post a Comment