In 1997, when Ellen DeGeneres came out on her TV show, sponsors pulled their ads, the religious right denounced her, and the show was canceled the following year. By 2008, when wedding pictures of DeGeneres and girlfriend Portia de Rossi ran in People, the national conversation had shifted dramatically. Vermont had legalized civil unions in 2000, Massachusetts legalized gay marriage in 2004, and 35 states eventually followed. And with its recent decision affirming the right of same-sex couples to marry in all 50 states, the Supreme Court aligned itself with the clear drift of American public opinion.

A recent Gallup poll showed that 55 percent of Americans think same-sex marriage should be legal, up from 27 percent in 1996. A Pew study found that 92 percent of LGBT Americans think people are more accepting of their sexual orientation than they were ten years ago. And this attitudinal trend appears to be self-sustaining.

“The legalization of gay marriage is both helping and in many cases requiring gay people to be out in ways they weren’t before,” says Patrick Egan, a professor of politics and public policy at New York University. “Part of that is an institution like marriage makes public your commitment and relationship to other people, and it then highlights your identity in a way that is different from before.”

Hollywood has been instrumental in promoting acceptance for the LGBT community. A GLAAD survey found that while only 1.1 percent of TV characters were scripted as LGBT in 2007, the percentage now is closer to reality—4.4 percent on TV vs. 3.8 percent in the general population.

And they’re making headlines. In January, Jeffrey Tambor won a Golden Globe for his portrayal of a transgender person on the hit show Transparent, and last month Bruce Jenner sat down with Diane Sawyer to discuss his gender transition. In a Hollywood Reporter poll, 27 percent of respondents said TV shows like Glee and Modern Family helped them support same-sex marriage.

Egan says the increased visibility of the LGBT community is especially powerful where it is most rare. “What’s most important is the increasing acceptance of LGBT folks in cultural circles where they remain until recently quite closeted—for example, in college and professional athletics.”

In 2013, NBA center Jason Collins became the first player in one of the four major North American professional sports leagues to come out. He used that platform to criticize Governor Mike Pence of Indiana for supporting the state’s religious freedom bill, which in its original form would have allowed business owners to deny service to same-sex couples. At one point Collins tweeted, “Is it going to be legal for someone to discriminate against me & others when we come to the #FinalFour?”

If you want to see what LGBT rights will look like in coming years, says Egan, look to Massachusetts. “That’s where the country is going in the next 20 years. For starters, they have very strong protections in employment and housing, they have same-sex-marriage rights, they also have strong policies around anti-gay bullying in schools. It is one of the top five states in the country for LGBT rights.”

Full rights for LGBT people may also have long-term economic benefits. According to a study by the U.S. Agency for International Development and the Williams Institute for Sexual Orientation Law and Public Policy at UCLA, nations close to embracing full equality for LGBT people had a higher per capita GDP than other countries.

As the study’s lead author, UMass Amherst economist M.V. Lee Badgett, wrote in The Atlantic last year, “A better environment for LGBT individuals can be an attractive bargaining chip for countries seeking multinational investments… On a recent trip to Peru, I talked with people in businesses, universities, and government ministries who expressed concern that because their country lags behind many other South American countries on LGBT rights, they fear they could be less competitive globally. They are right to be worried.”

Egan says LGBT acceptance still has a long way to go in the U.S. as well. “If you survey LGBT folks, many will tell you they’ve experienced discrimination at work, and gay men still fear violence for being open in public,” he says. “The casual bigotry that occurs around gay people is going to take a lot longer to work out of the system. That is going to be the test.”

Next: Millennials and Gender: A Major Attitude Shift