In 1977, in his novel A Scanner Darkly, Philip K. Dick invented the perfect drug — at least from society’s point of view. Substance D, or “Death,” as it’s known on the street, hooks users immediately and utterly. The government (or Somebody in Charge) monopolizes production and distribution. Brain damage sets in rapidly, reducing the addict to a zombie incapable of anything except menial labor — such as cultivating Substance D. The kicker: the drug delivers no high, at least none that Dick describes.

Why take it? Perhaps because it’s there. This non-euphoric, non-psychedelic, brain-destroying plague makes Scanner one of Dick’s bleakest and most claustrophobic novels.

That poses a problem for Richard Linklater in this faithful adaptation: how to make such an exercise in dysphoria pleasurable. Perhaps through rotoscoping, darkly. Computer animation of live-action footage delightfully discombobulated Linklater’s Waking Life. Lately it’s been seen in those creepy Charles Schwaab commercials. Here its fluid, whimsical vertigo doesn’t mitigate the grimness, but helped out by a terrific cast it does enliven the whimsy, pathos, mind-boggling paradoxes, and melancholy ironies of Dick at his finest.

Not that Scanner proscribes all hallucinogenic moments, only that those allowed are mostly of the icky DT and brown-acid variety. The film opens with illusory aphids swarming from the head of Freck (Rory Cochrane). Barris, a gloriously convoluted paranoid wheedler played with motor-mouthed brio by Robert Downey Jr., reassures him that these are just preliminary symptoms in Death’s inescapable pathological course. The way this scene unfolds, the film itself seems to unreel from Freck’s skull. Be that as it may, Freck remains a marginal character, though his warped perceptions prove most amusing.

Instead, the narrative springs from Bob Arctor (Keanu Reeves), a druggie loser who shares a dilapidated Orange County house with Barris and Luckman (Woody Harrelson, who else?) and has unrequited hots for Donna (Winona Ryder). The trio are Cheech and Chong plus one, and their Substance D jones has translated into low moron comedy and clammy-palmed paranoia. They fear the narcs, one another, and themselves.

Not without cause. Arctor, we learn early on, is a government narcotics agent so undercover that not even his fellow agents can know who he is. He can’t appear as himself except when he’s disguised by a “scramble suit,” a covering on which is projected the features of countless random people in a rapid blur. The rotoscoping does this justice: Arctor is everyone and no one.

But the suit isn’t the only thing that’s scrambled. Downing doses of Death so he can fit in with the other druggies has taken its toll on Arctor. He can’t trust his own perceptions, especially since his bosses suspect him of being a dealer and, unaware (or are they?) that he’s the same person, want him to investigate himself. They install scanners — in this world the only guarantee of objective reality — in his house, but the scanners play back what Arctor knows is not real.

Like many of Dick’s parallel-mirror scenarios, this one is air-tight and diabolical. More fresh air in the form of Linklater’s humor would be welcome. Despite the revelation promised by the title reference to Corinthians, Scanner gazes only on dissolution and death.