I managed to get this working a while ago using the image kit!
Here is a link to the thread:
http://forum.thegamecreators.com/?m=forum_view&t=178800&b=1
Here is some code:
sync on
sync rate 100
`Create buffer with an opaque black color
IK create target image 1, screen width(), screen height(), 0xFF000000
`Load effect and map
IK load effect "Media/FX/Distortion.fx", 1
load image "Media/DistortionMap.bmp", 3
IK set effect texture 1, "g_Map", 3
IK set effect technique 1, "Mapped"
`Set blend mode
IK set blend mode BLEND_FORCENOALPHA
do
`the actual drawing goes to the buffer (image 1)
draw to image 1
`Render, just some blobs to draw
if mouseclick() = 1 then box mousex() - 2, mousey() - 2, mousex() + 2, mousey() + 2
if mouseclick() = 2 then ink rgb(rnd(255), rnd(255), rnd(255)), 0
`Finally render to the screen
draw to bitmap 0
IK paste image 1, 0, 0, 1
sync
loop
Hope that helps!