Modern Chinese attitudes about homosexuality are influenced alot by missionaries, global cultural trends, and modern state ideology. Ancient China had varied attitudes. Some Confucian scholars saw certain forms of same sex relationships negatively, but not necessarily in the way Christians did.
There actually was a folk religious cult in premodern China devoted to a deified gay man, who became known as Tu Er Shen or the Rabbit God ("rabbit" in Chinese slang refers to a gay men, since rabbits are difficult to sex, suggesting the idea of gender fluidity, which fits a common understanding of homosexual and transgender behaviors in non-western cultures). There's even a temple dedicated to him in modern Taiwan. Some Confucian scholars viewed the cult negatively, but the cult's origins are in folk religion heavily shaped by Taoism and shamanism.
Yes, that's mostly a legacy of modernity. But you can still find echoes of the past, such as the concept of bishonen (beautiful boys) in anime and manga, which is influenced by Chinese aesthetics and philosophy, and the legacy of Japanese homoeroticism. Something similar wasn't unheard of in Europe, either. Many of Shakespeare's sonnets were written with a young male as the subject, not a woman. It was quietly glossed over by the Victorians, and Americans largely inherit that reading today. But it's relatively uncontroversial among serious scholars of Shakespeare.
The Japanese courts have also recently ruled that the refusal to recognize same-sex marriage is unconstitutional. However, the legal process is still ongoing. Large Japanese cities have gay neighborhoods, like Ni-Chome in Tokyo, that are well known to many people in Japan. Japanese religion also tends to be widely tolerant of gay people, though much of Japanese religious organizations are small and family-run affairs, and don't necessarily have national influence. The issue is that talking about anything perceived as different in Japan is culturally difficult, not because it's perceived as sinful, but because it's seen as embarrassing to emphasize ones own differences from the group.
I met a gay man once from Morocco and he dressed in traditional women's clothes of that country, which is a traditional gender identity in Morocco. However, modern North Africa isn't necessarily safe for gay people, for alot of reasons. Male rape is used by gangs sometimes as a way to establish dominance or humiliate people, often gay men are targeted (maybe this is what the actual sin of Sodom was about?).