"A Scanner Darkly" (1977) is a bleak mixture of science fiction and police procedural novels; in its story, an undercover narcotics police detective begins to lose touch with reality after falling victim to Substance D, the same permanently mind-altering drug he was enlisted to help fight. Substance D is instantly addictive, beginning with a pleasant euphoria which is quickly replaced with increasing confusion, hallucinations and eventually total psychosis. In this novel, as with all Dick novels, there is an underlying thread of paranoia and dissociation with multiple realities perceived simultaneously. It was adapted to film by Richard Linklater.