The effect you see in A Scanner Darkly isn’t from a filter, effect, or plugin. It’s a very VERY old method that has been around since the dawn of motion graphics called Rotoscoping.
The VFX company that made the film used their own in-house software called Rotoshop (no, you wont find it anywhere), of course anything like photoshop would be fine.
So in short they filmed it, and drew over it, frame by frame. Of course as you can see A Scanner Darkly uses a much lower frame rate than real footage, can you imagine an art team rotoscoping to 25fps? There would be an surge in RSI-related lawsuits :D
more info: http://www.wired.com/wired/archive/14.03/scanner_pr.html