Buddhism and sexual orientation
The relationship between Buddhism and sexual orientation varies by tradition and teacher. According to some scholars, early Buddhism appears to have placed no special stigma on homosexual relations, since the subject was not mentioned. Lay followers and monastic practices 
In the early sutras of Buddhism, "accepted or unaccepted human sexual conduct" for laypersons "is not specifically mentioned." "Sexual misconduct" is a broad term, subject to interpretation according to followers' social norms. Early Buddhism appears to have been silent concerning homosexual relations. According to the Pāli Canon and Āgama (the early Buddhist scriptures), it is not specified that same or opposite gender relations have inherently something to do with sexual misconduct, and some Theravada monks express that same-gender relations do not violate the rule to avoid sexual misconduct, which would mean not having sex with someone underage (thus protected by their parents or guardians), someone betrothed or married and who have taken vows of religious celibacy. Some later traditions feature restrictions on non-vaginal sex (some Buddhist texts mention non-vaginal sex as sexual misconduct, including men having sex with men or paṇḍaka) though some Buddhist monks interpret such texts as being about forced sex. This non-vaginal sex view is not based on what Buddha said, but from some later scriptures such as the Abhidharma texts. Regarding Buddhist monks, the Vinaya (code of monastic discipline) bans all sexual activity, but does so in purely physiological terms, making no moral distinctions among the many possible forms of intercourse it lists. Among Buddhists, there is a wide diversity of opinion about homosexuality. Buddhism teaches that sensual enjoyment and desire in general are hindrances to enlightenment, and inferior to the kinds of pleasure (see, e.g. pīti, a Pāli word often translated as "rapture") that are integral to the practice of jhāna. Buddhist texts

Early texts

Within the earliest monastic texts such as the Vinaya ( 4th century BCE), male monks are explicitly forbidden from having sexual relations with any of the four genders: male, female, ubhatovyañjanaka and paṇḍaka; various meanings of these words are given below. Later, the Buddha allowed the ordination of women, forbade ordination to these other types of people, with exceptions to a few particular types of paṇḍaka. The Buddha's proscriptions against certain types of people joining the monastic sangha (ordained community) are often understood to reflect his concern with upholding the public image of the sangha as virtuous; in some cases, this is explicitly stated. Social acceptability was vital for the sangha, as it could not survive without material support from lay society. Ubhatovyañjanakas

The word ubhatovyañjanaka is usually thought to describe people who have both male and female sexual characteristics: hermaphrodites (intersex). In the Vinaya, it is said that ubhatovyañjanaka should not be ordained, on account of the possibility that they would entice a fellow monk or nun into having sex. Although it has been seen by some that the category of ubhatovyañjanaka is of later addition to the early buddhist texts, since it does not appear in the early suttas, the Pāṭimokkhas, nor in the early parts of the Vinaya. Paṇḍakas
The paṇḍaka is a complex category that is variously defined in different Buddhist texts. In the earliest texts, the word seems to refer to a socially stigmatized class of trans-feminine and/or cross-dressing people, some of whom may have been sex workers. Paisarn Likhitpreechakul argue that these people are grouped together with groups who are excluded from ordination as well; those with physical disabilities such as deafness or dwarfism, or those who have committed crimes. "The Story of the Prohibition of the Ordination of Pandaka" from the Vinaya claims that the ban is a response to the example of a paṇḍaka monk with a desire to have sex. Being refused by other monks, he had sex with animal handlers, who then told the wider community and brought disgrace upon the sangha. Since the word  paṇḍaka does not appear in either  of the early Suttas nor in the early parts of the Vinaya, it has been seen by some as  a possible indication that pandaka's inclusion in the Vinaya did not happen in the Buddha's lifetime but was added later. In the Lotus Sutra, it said Bodhisattva should not go near Paṇḍaka, as like what monk rules said in Vinaya. The Theravadin text Milinda Panha, claims that Paṇḍakas let out secrets through their imperfection. LGBTQ+ people in later traditions
Some modern commentators interpret the word ubhatovyanjañaka as including those who are not physically intersex, but display behavioral and psychological characteristics of both sexes, such as a woman who is attracted to other women. 5th-century Buddhist writer Buddhaghosa describes ubhatobyanjanaka as people with the body of one sex but the "power", or gender of the other. Leonard Zwilling argues that in this account Buddhaghosa does not in fact describe "hermaphroditism" but rather bisexuality or homosexuality. Janet Gyatso pointed out that Zwilling destroys his own argument that pandakas are homosexuals when he writes, "The Vinaya, in fact, goes so far as to distinguish sexual activity between normative males from sexual relations between a socially normative male and a pandaka." In other texts, the term paṇḍaka can include those born sexually indeterminate or with no sex, eunuchs, those whose impotence changes every half month, males who gain sexual potency by absorbing other men's semen, or spying on other people   having sex. It sometimes includes males or females with any sexual dysfunction, such as impotence or irregular menstrual cycles. The common element seems to be those whose sexuality is either limited physiologically, or those who are sexually impotent. Together these impotence types are almost always portrayed negatively as a pariah class, especially in the earliest texts. In modern contexts, paṇḍaka is sometimes  alleged to include lesbians, gay men, and transgender and intersex people, although in ancient times, a man who sexually penetrated another man or a paṇḍaka was not himself considered a paṇḍaka. Some texts of the Abhidharma state that a paṇḍaka cannot achieve enlightenment in their own lifetime, but must wait for reincarnation as a man or woman. Ananda — Buddha's cousin and disciple — was said to be a paṇḍaka in one of his many previous lives, as was the Buddhist nun Isidāsī (from the Therigatha). In both cases, birth as a paṇḍaka was a result of poor karma, and the idea that being a paṇḍaka stems from bad behaviour in a previous life is common in Buddhist literature. Asanga and Vasubandhu discussed if a pandaka was able to be enlightened or not. In the Samantapasadika, a work of the 5th century CE Theravadin commentator and scholar Buddhaghosa's, paṇḍaka are described as being filled with defiling passions (ussanakilesa), unquenchable lusts (avapasantaparilaha) and are dominated by their libido (parilahavegabhibhuta). The 4th century Mahayana Buddhist writers Vasubandhu and Asanga contend that the paṇḍaka has no discipline for spiritual practice, due to their defiling passions of both male and female sexes. They lack the moral fortitude to counter these passions because they lack modesty and shame. Incapable of showing restraint, such a being is abandoned by their parents and lacking such ties are unable to hold strong views. Asanga, like Vasubandhu, refuses the pandaka recognition as a layman on the grounds that such persons are unfit to associate with or serve the Sangha. Asanga, however, considers them capable to practice the path of a layman individually if they so desire, but without receiving recognition as a layman or being introduced in the sangha. A position similar to Asanga view was also featured in the Lotus Sutra, where sangha members were advised to avoid the paṇḍaka. Buddha's proscriptions against certain types of people joining the monastic sangha (ordained community) are often understood to reflect his concern with upholding the public image of the sangha as virtuous. Peter Jackson, the scholar of sexual politics and Buddhism in Thailand, speculates that the Buddha was initially reluctant to allow women to join the sangha for this reason. Jackson explains:

Buddhism, the middle path, has always been concerned with the maintenance of social order and since the Buddha's time the sangha has never claimed to provide a universal vehicle for the spiritual liberation of all individuals in society, explicitly excluding those who are considered to reflect badly on the monkhood in terms of prevailing social norms and attitudes.Jackson, Peter A. (1998). "Male Homosexuality and Transgenderism in the Thai Buddhist Tradition". In Queer Dharma: Voices of Gay Buddhists, edited by Winston Leyland. San Francisco : Gay Sunshine Press. Social acceptability was vital for the sangha, as it could not survive without material support from lay society. Several Theravada Buddhist texts state that the members of the paṇḍaka are excluded from a variety of Buddhist practices (in addition to ordination):

 acting as preceptors in ordination ceremonies
 making donations to begging monks
 meditating and
 ability to understand the Dharma. Classical Mahayana scholars like Shantideva and Aśvaghoṣa considered non-vagina sex (including men sex with men) to be sexual misconduct. Shantideva based his views on quotes from the Saddharma-smrtyupasthana Sutra. According to Mizuno Kōgen's study, Saddharma-smrtyupasthana Sutra is related to Ghoṣa's Abhidharmāmṛtarasaśāstra, and is compiled by Sarvastivada sect (possibly from someone related to Ghoṣa after the 2nd century). In the Great Treatise on the Perfection of Wisdom (Sanskrit: Mahā-prajñāpāramitā-śāstra), the Madhyamaka scholar Nagarjuna mentioned the non-vagina sex restriction as based on coerced action toward one's own spouse. In contrast, later texts, particularly Tibetan Buddhist writings, occasionally value paṇḍaka positively for their "middleness" and balance. The paṇḍaka in these Tibetan works is translated with the term ma ning — "genderless" or "without genitals". The 13th-century Tibetan monk Gyalwa Yang Gönpa, who was one of the significant figures in the early Drukpa Kagyu sect, writes about ma ning as a balanced state between maleness and femaleness. Yang Gönpa describes ma ning as "the abiding breath between male exhalation and female inhalation" and "the balanced yogic channel, as opposed to the too tight male channel, and the too loose female one". Most Mahayana teachings assert that all beings who correctly practice the dharma may reach enlightenment, since all possess innate Buddha nature. Enlightenment being achievable even in a single life. Tibetan Buddhism
There are different views among Tibetan Buddhist teachers on acceptable expressions of sexuality. Historically, Gampopa (12th century), one of the main early masters of the Kagyu school of Tibetan Buddhism, followed the Indian Buddhist tradition, starting with the 3rd-century Hinayana texts of Vasubandhu, and stated that oral and anal sex, whether with a man or a woman, are violations of the third precept regarding inappropriate sexual behavior. Longchenpa, the 13th-century founder of the Nyingma school, citing the 3rd-century Mahayana texts of the Indian master Asanga, elaborated that inappropriate sexual behavior also include the hands among inappropriate parts of the body for sexual activity. In the same way, Gelug predecessor Je Tsongkhapa also adheres to such rules in his studies. Various contemporary teachers of Tibetan Buddhist lineages, including the 17th Gyalwang Karmapa, have offered understanding towards LGBTQ people while noting that same-sex relationships do not necessarily constitute misconduct for lay people. The Dalai Lama has maintained the views of Je Tsongkhapa

The 14th Dalai Lama has "voiced his support for the full recognition of human rights for all people, regardless of sexual orientation," while noting that from a Buddhist point of view, lesbian and gay sex is "generally considered sexual misconduct." In the most recent interview with the Dalai Lama on this topic (March 10, 2014), the Dalai Lama said gay marriage is OK provided it's not in contradiction with the values of one's chosen religion. The Dalai Lama has also stated that any sex other than penis-vagina intercourse with one's own monogamous partner, including oral sex, anal sex, and masturbation is improper from the Buddhist perspective. In his 1996 book Beyond Dogma, he states, "A sexual act is deemed proper when the couples use the organs intended for sexual intercourse and nothing else... homosexuality, whether it is between men or between women, is not improper in itself. What is improper is the use of organs already defined as inappropriate for sexual contact." The Dalai Lama cited the Indian Buddhist texts of Vasubandhu, Asanga, and Ashvaghosha as his sources concerning what constitutes inappropriate sexual behavior. In 1997 he stated: "Sexual organs were created for reproduction between the male element and the female element — and everything that deviates from that is not acceptable from a Buddhist point of view." The Dalai Lama has repeatedly said to LGBT groups that he can't rewrite the texts. He thinks that this is the type of issue that would need to be discussed by a council of Buddhist elders from all Buddhist traditions. Theravada Buddhism
Peter Jackson, an Australian scholar of sexual politics and Buddhism in Thailand, writes that "Buddhism is a complex tradition and there is no single canonical or scripturally sanctioned position on homosexuality." Thailand is one of several countries with a large population of Theravada Buddhist. In traditional Thai Buddhist accounts of sexuality, "[sexual] actions and desires have an involuntary cause [and] do not themselves accrue any future karmic consequences. They are the outworking of past karma, not sources for the accumulation of future karma. According to Bunmi, homosexual activity and the desire to engage in homosexual activity fall into this category and are not sinful and do not accrue karmic consequences." Jackson writes that this understanding of homosexuality "prevailed in Thailand until recent decades." In the 1980s in Thailand, during the AIDS epidemic, there was "a shift in Buddhist attitudes from relative tolerance of homosexuality to condemnation." These views were "unprecedented in recent Thai history." During this time there were two ways Buddhists viewed homosexuality: in the sympathetic view, it was said that homosexuality arose from the karma of previous lifetimes; in the intolerant view, it was seen as arising from immoral conduct in one's present life. In 1989, the supreme governing body of the Thai sangha affirmed that "gays" (here translated from Thai kathoey) are prohibited from being ordained. Their declaration has apparently gone unheeded in some quarters, as Phra Pisarn Thammapatee (AKA Phra Payom Kalayano), one of the most eminent monks in the country, demanded in 2003 that 1,000 gay monks be ousted from the sangha, and that better screening processes are put in place to keep out any gay postulants. Recently, Phra Payom Kalayano, an eminent monk and abbot, affirmed the rights of gay monks to join the Sangha: "In the past, katoey had no hope of being ordained because the rules were stricter and society was less open minded. But they have just as much right as anyone else to join the monkhood." This view has been affirmed by other Thai Theravada monks. But it's not known if that statement given by Phra Payom was supported only by some monks of his sangha or by official structures of his Theravada school. There is no information if any other Thai branches of Theravada has changed their attitude towards LGBT ordination because other Theravada branches does not seem to have changed their attitude on this issue. Japanese Buddhism

Several writers have noted the strong historical tradition of open bisexuality and homosexuality among male Buddhist institutions in Japan. When the Tendai priest Genshin harshly criticised homosexuality as immoral, others mistook his criticism as having been because the acolyte wasn't one's own. Chigo Monogatari (稚児物語), "acolyte stories" of love between monks and their chigo were popular, and such relationships appear to have been commonplace, alongside sex with women. Western Christian travellers to Japan from the 16th century have noted (with distaste) the prevalence and acceptance of forms of homosexuality among Japanese Buddhists—Jesuit priest Francis Cabral wrote in 1596 that "abominations of the flesh" and "vicious habits" were "regarded in Japan as quite honourable; men of standing entrust their sons to the bonzes to be instructed in such things, and at the same time to serve their lust". A 17th-century Japanese Buddhist scholar, Kitamura Kigin(北村季吟,), wrote that Buddha explained the pursuit of homosexuality over heterosexuality among priests:
It has been the nature of men's hearts to take pleasure in a beautiful woman since the age of male and female gods, but to become intoxicated by the blossom of a handsome youth... would seem to be both wrong and unusual. Nevertheless, the Buddha preached that [Mount] Imose was a place to be avoided and the priests of the law entered this Way as an outlet for their feelings, since their hearts were, after all, made of neither stone nor wood. Like water that plunges from the peak of Tsukubane to form the deep pools of the Minano River, this love has surpassed in depth the love between women and men in these latter days. It plagues the heart not only of courtier and aristocrat but also of brave warriors. Even the mountain dwellers who cut brush for fuel have learned to take pleasure in the shade of young saplings." — Wild Azaleas (1676)
A later Japanese legend attributed the introduction of monastic homosexuality to Japan to Shingon founder Kukai, although scholars now dismiss the veracity of this assertion, pointing out his strict adherence to the Vinaya. Nonetheless, the legend served to "affirm same-sex relation between men and boys in 17th century Japan." Chinese Buddhism
About Buddhism and homosexuality in China, scholar A. L. De Silva writes, "Generally the attitude has been one of tolerance. Matteo Ricci, the Jesuit missionary who lived in China for 27 years from 1583, expressed horror at the open and tolerant attitude that the Chinese took to homosexuality and naturally enough saw this as proof of the degeneracy of Chinese society." Venerable Hsing Yun, one of the premier figures in contemporary Chinese Buddhism, has stated that Buddhism should never teach intolerance toward homosexuality, and that people should expand their minds. Hsing Yun is a best-selling author throughout the Sinosphere, as well as an advocate of Humanistic Buddhism, an approach to reform Chinese Buddhism to match the needs of contemporary laypeople. As such, his views may not be wholly reflective of the older Buddhist views in China. However, at an earlier point (1998), he is quoted as remarking that "according to Buddhism, any emotional involvement, whether homosexual or heterosexual, is a form of attachment ... and, therefore, is a source of suffering," and when the topic of homosexuality, in particular, came up "the master spoke more strongly, calling homosexuality a perverted view (xiejian)." An example of an older view in opposition to homosexuality is given by the traditional master, Hsuan Hua, an important figure for Buddhism in both China and the United States. Master Hsuan Hua stated that homosexuality "plants the seeds that lead to rebirth in the lower realms of existence". In his commentary on the Sutra of Forty-two Chapters, he described homosexuality as behavior caused by confusion, as the product of sexual desires. Some Mahayana Buddhist leaders were active in the movement for same-sex marriage rights in Taiwan which legalized same-sex marriages in 2019. Buddhism in the West

In contrast to Buddhism in Asia, modern Buddhism in the Western world (European Union, United States of America, Canada, Australia and New Zealand) is typically associated with a concern for social equality—partly as a result of its largely middle-class intellectual membership base, and its philosophical roots in freethought and secular humanism. When applying Buddhist philosophy to the question of homosexuality, western Buddhists often emphasize the importance the Buddha placed on tolerance, compassion, and seeking answers within one's self. They stress these overarching values rather than examining specific passages or texts. As a result, western Buddhism is often relatively gay-friendly, especially since the 1990s. As an interpretation of what is sexual misconduct is an individual decision and not subject to judgment by any central authority, a view of accepting all peoples, but rejecting certain types of sexual acts is more predominant. LGBT people such as Issan Dorsey, Caitriona Reed, Pat Enkyo O'Hara and Soeng Hyang have been ordained as Buddhist monastics and clergy. A more anachronistic assessment comes from the western scholar Alexander Berzin, 

The Dzogchen Ponlop Rinpoche, holder of the Karma Kagyu and Nyingma lineages, in a 2008 talk delivered to LGBT Dharma practitioners at the Shambhala Meditation Center of New York, stressed that for vajrayana lay practitioners, homosexual relationships are no better or worse than heterosexual relationships and that only unhealthy relationships, in general, are to be avoided. Both the Nalandabodhi sangha, which was founded by The Dzogchen Ponlop Rinpoche, and the Shambhala sanghas founded by Chögyam Trungpa Rinpoche have stated that they are welcoming of all sexual orientations. The Shambhala Meditation Center of New York hosts a weekly practice group, Queer Dharma, specifically catering to the needs of the LGBTQ Buddhist community. According to the Danish Karma Kagyu Lama Ole Nydahl, Buddha saw homosexuality as circumstances making life more difficult, but also explained the reason for homosexuality could be aversion against the opposite sex in a former life. Nydahl says however that sexual orientation is not really important in order to practice Buddhism. Well known Zen Buddhist, Thích Nhất Hạnh (Plum Village Tradition), notes the spirit of Buddhism is inclusiveness and states "when you look at the ocean, you see different kinds of waves, many sizes and shapes, but all the waves have water as their foundation and substance. If you are born gay or lesbian, your ground of being in the same as mine. We are different, but we share the same ground of being." The U.S. branch of Soka Gakkai International, a Japan-based new religious movement (Japanese new religion) influenced by Nichiren Buddhism, announced in 1995 that they would start holding wedding ceremonies for same-sex couples, and in 2001 established a conference for LGBT members and their supporters. A Buddhist temple in Salt Lake City connected with Jodo Shinshu, another Japanese school of Buddhism, also holds religious rites for same-sex couples. Another Buddhist organization founded in the West, Juniper Foundation, wrote an article A Buddhist Vote for Same Sex Marriage demonstrating how Buddhist thinking embraces same-sex marriage:
The heart of Buddhist thought is its insight philosophy, which uses critical inquiry to challenge dogma and to reveal how seemingly fixed ideas are more arbitrary than we might think. Applying this philosophy, we see that social customs are not fixed laws but evolving conventions that serve a purpose in a particular culture and time. Marriage is one of these conventions. It is not a rigid law but a social custom that evolves. In western traditions, there is widescale support for LGBT rights including the European Buddhist Union, the Buddhist Churches of America, many Shin Buddhist groups, and Zen leaders such as Thich Nhat Hanh, founder of the Plum Village Tradition. In a PEW research poll, 88% of American Buddhists stated that homosexuality should be accepted. This was a higher level of support than any other religious group studied. On 2012, the Australian branch of Buddhism voiced its support for same-sex marriage in a hearing of the Australian Parliament that sought to gather views on whether to legalize same-sex marriage. 