Moral inversion is based on the hedonic calculus - that morality is a matter of happiness and suffering, pleasure versus pain. This has it that there is nothing intrinsically good or bad about anything - only the consequences for human happiness and suffering.
Perhaps it began with divorce. It was argued that there is nothing intrinsically wrong with divorce as such (because it is just a legal procedure - obviously, because marriage has no divine dimension, because there is no God); therefore, the only thing wrong with divorce is that it makes people unhappy.
It therefore follows that there is nothing wrong with divorce. Because sometimes staying married makes people more unhappy than divorce. In fact (according to this line of reasoning) if divorce makes people happier, then divorce is good.
And if there is nothing wrong with divorce, except unhappiness, and if sometimes (perhaps usually?) divorces make people happier - then the only people who are really wicked are those who make divorced people feel guilty and miserable.
Therefore, we must campaign and propagandise in favour of divorce, for a free and easy and accepting attitude to divorce - because then life would be happier (and happiness is the ultimate 'good').
The only wicked ideologies are those that strongly-discourage or prevent divorce (because they enforce misery), the only evil people are those who (by their attitudes, words, behaviour) make divorcees feel guilty and miserable. Therefore Christianity and Christians are (among others) the bad ones; and those who promote uncomplicated, simple, cheap, quick and easy, cheerful divorce are virtuous.
And here we are - moral inversion: what was bad (divorce) is now good: what was good (Christianity) is now evil.
In my youth it was promiscuity.
Sex (between consenting adults, as the phrase ran) made people happy, and happiness is good (and God and Christianity are childish nonsense) - so there was 'nothing wrong' with promiscuity... so long as it made people happy.
But promiscuous people were not always happy: why? Well often because they felt guilty, or felt jealous. So the problems were the ideologies and people who made promiscuous people feel guilty, and the ideologies and psychological habits that made people feel jealous.
Happy, charming, attractive, successful promiscuous people were massively portrayed in the mass media and the arts - they were supposed to show us 'how to do it'. Utopia was simply a matter of being open, free, relaxed, accepting, non-judgemental... of getting rid of the oppressive baggage of organized religion (especially Christianity) and Victorian values (which were actually capitalist, oppressive, sexist, and racist).
Then we too could become like these people (pop stars, actors, artists and other cool types) that we read about in the newspapers - they were moral heroes, pointing the way into a world of jealousy-free, guilt-free expanding possibilities for happiness. the ideal was those who would have sex with anybody, anywhere, any time - and just enjoy it for what it was; staying cheerful, always having fun and being fun, everybody's friend, everybody's lover (when anybody felt like it)...
(This was the ideal - of course, diseases got in the way, although antibiotics cured most (sensible people would take a course of meds after each cheerful encounter - indeed they were taking antibiotics almost continuously): sexutopia was invaded first by incurable Herpes, then potentially fatal AIDS put a crimp in the swinging lifestyle - but the ideal of free and easy universal promiscuity did not change. It was still the highest value, and the restrictions imposed by disease were portrayed as a tragedy because ending the utopian lifestyle; not-never as a nemesis brought-on by that lifestyle.)
The only really evil people were those who wanted to interfere with this utopian lifestyle of promiscuity - the people who said that promiscuity was intrinsically wrong (even when it was fun and did make people happy, and even when nobody felt jealous about their partner's promiscuity); these evil people were against happiness, they were kill-joys, they were the oppressors.
So on the one hand there were depicted the good, fun, funny and happy, admirable heroes of promiscuity; and ranged against them the evil, boring, depressing, miserable, pathetic and despicable villains who were against promiscuity (although we also knew that they were really hypocrites, and really just as promiscuous as everybody else, but pretending not to be).
This process of moral inversion has, decade by decade, been extended through all manner of sexual behaviours. preferences, identity claims - always premised upon the assumption that 'there is nothing intrinsically wrong with...'.
So we may see that morality depends on assumptions about what is intrinsically good and bad, and why.
The West replaced revealed religion with a hedonic calculus of maximizing pleasure and minimizing suffering, but we did not destroy morality - instead we inverted it. The utopia of sex in a context of permanent marriage with children was replaced by the utopia of free and easy fun sex with anybody and everybody all of the time.
What was virtue is now wickedness; and vice versa. This is Nietzsche's 'transvaluation of values'. It is not a theory: it happened - it is now - it is mainstream.
It is, indeed, compulsory.
Now the definition of a good and admirable person is a successful and care-free pleasure seeker - and an evil person is anyone or any set of ideas that who attempt to limit or thwart successful pleasure-seeking.