I'm unable to properly experiment this interesting filter.
Just to see the effect I took:
1-the following image
Attachment:
5624-close-up-portrait-of-a-beautiful-brunette-pv.jpg [ 223.94 KiB | Viewed 1970 times ]
2-duplicated the layer then applied lens distortion, getting this layer
Attachment:
5624-close-up-portrait-of-a-beautiful-brunette-pv_distgorted.jpg [ 173.35 KiB | Viewed 1970 times ]
3-run the filter with defaults
Result OK.
But if I change the "mode", this is misinterpreted:
a) setting Multiply simply repeat 3 times the BG
b) setting Divide applies Multiply
c) setting Dodge applies Difference
IMHO this is due to the use of the parameter "mode" as an absolute number which does not correspond to the official layer modes.
If I change the statement:
over.mode=mode
with
over.mode=MODES[mode]
it works properly.
Am I wrong?