It's very very unclear. One person can hit heroic doses (200-1000 micrograms of LSD or equivalent of mushrooms) and be completely fine afterwards, another can have a small, usually safe dose and have long-term issues.
There are studies done to detect who will be susceptible to this, but there is no clear answer yet (aside from people with family history of bipolar or schizophrenia).