Philip K Dick's A Scanner Darkly contains an Author's Note at the end of the book on this topic. This is the note from the copy I have:

"AUTHOR'S NOTE:

This has been a novel about some people who were punished entirely too much for what they did. They wanted to have a good time, but they were like children playing in the street; they could see one after another of them being killed--run over, maimed, destroyed--but they continued to play anyhow. We really all were very happy for a while, sitting around not toiling but just bullshitting and playing, but it was for such a terrible brief time, and then the punishment was beyond belief: even when we could see it, we could not believe it. For example, while I was writing this I learned that the person on whom the character Jerry Fabin is based killed himself. My friend on whom I based the character Ernie Luckman died before I began the novel. For a while I myself was one of these children playing in the street; I was, like the rest of them, trying to play instead of being grown up, and I was punished. I am on the list below, which is a list of those to whom this novel is dedicated, and what became of each.

Drug misuse is not a disease, it is a decision, like the decision to step out in front of a moving car. You would call that not a disease but an error in judgment. When a bunch of people begin to do it, it is a social error, a life-style. In this particular life-style the motto is "Be happy now because tomorrow you are dying," but the dying begins almost at once, and the happiness is a memory. It is, then, only a speeding up, an intensifying, of the ordinary human existence. It is not different from your life-style, it is only faster. It all takes place in days or weeks or months instead of years. "Take the cash and let the credit go," as Villon said in 1460. But that is a mistake if the cash is a penny and the credit a whole lifetime.

There is no moral in this novel; it is not bourgeois; it does not say they were wrong to play when they should have toiled; it just tells what the consequences were. In Greek drama they were beginning, as a society, to discover science, which means causal law. Here in this novel there is Nemesis: not fate, because any one of us could have chosen to stop playing in the street, but, as I narrate from the deepest part of my life and heart, a dreadful Nemesis for those who kept on playing. I myself, I am not a character in this novel; I am the novel. So, though, was our entire nation at this time. This novel is about more people than I knew personally. Some we all read about in the newspapers. It was, this sitting around with our buddies and bullshitting while making tape recordings, the bad decision of the decade, the sixties, both in and out of the establishment. And nature cracked down on us. We were forced to stop by things dreadful.

If there was any "sin," it was that these people wanted to keep on having a good time forever, and were punished for that, but, as I say, I feel that, if so, the punishment was far too great, and I prefer to think of it only in a Greek or morally neutral way, as mere science, as deterministic impartial cause-and-effect. I loved them all. Here is the list, to whom I dedicate my love:

To Gaylene deceased

To Ray deceased

To Francy permanent psychosis

To Kathy permanent brain damage

To Jim deceased

To Val massive permanent brain damage

To Nancy permanent psychosis

To Joanne permanent brain damage

To Maren deceased

To Nick deceased

To Terry deceased

To Dennis deceased

To Phil permanent pancreatic damage

To Sue permanent vascular damage

To Jerri permanent psychosis and vascular damage

. . . and so forth.
In Memoriam. These were comrades whom I had; there are no better. They remain in my mind, and the enemy will never be forgiven. The "enemy" was their mistake in playing. Let them all play again, in some other way, and let them be happy."