Michael Douglas stars as Liberace and Matt Damon stars as Scott Thorson in "Behind the Candelabra."

Editor’s Note: This post was created for your reading pleasure as a collaborative effort between the editorial staffs of BuzzFeed and CNN.

Story highlights

HBO's "Behind the Candelabra: My Life With Liberace" is being lauded by critics

Michael Douglas and Matt Damon play the famed pianist and his lover

Many actors who are not gay in reality have portrayed gay characters, real and fictional

Tom Hanks, Charlize Theron and Hilary Swank won Oscars for playing gay or transgender characters

BuzzFeed/CNN  — 

Whether it’s for television or a feature film, it’s not easy to pull off a gay role as a straight actor. Many have tried, but it takes a great actor to make the role three dimensional and believable.

Steven Soderbergh’s “Behind the Candelabra: My Life With Liberace,” which aired on HBO on Sunday, is being lauded by critics, especially for its touching, respectful, and well-rounded performances by Michael Douglas and Matt Damon.

BuzzFeed.com: Lesbian drama set to take top honor at Cannes Film Festival

Here are 20 examples of actors who successfully pulled off playing a different sexuality on screen.

TriStar Pictures

1. Tom Hanks, “Philadelphia”

United Artists

2. Robin Williams, “The Birdcage”

BuzzFeed.com: Watch these dads meet their newborn twins for the very first time

Paramount Pictures

3. Matt Damon, “The Talented Mr. Ripley”

TriStar Pictures

4. Greg Kinnear, “As Good As It Gets”

Fos Searchlight Pictures

5. Hilary Swank, “Boys Don’t Cry” (while Swank’s character Brandon Teena was transgender, not gay, the role was iconic for many gays and lesbians)

BuzzFeed.com: Will Smith, DJ Jazzy Jeff, Alfonso Ribeiro reunite, sing “Fresh Prince” theme song

Newmarket Films

6. Charlize Theron, “Monster”

Newmarket Films

7. Christina Ricci, “Monster”

BuzzFeed.com: 20 biopic actors and their real-life counterparts

Focus Features

8. Jake Gyllenhaal, “Brokeback Mountain”

Focus Features

9. Heath Ledger, “Brokeback Mountain”

BuzzFeed.com: What would “Game of Thrones” characters look like if they were in the ’90s?

Sony Pictures Classics

10. Philip Seymour Hoffman, “Capote”

HBO

11. Nelsan Ellis, “True Blood”

BuzzFeed.com: Canceled TV shows that should be revived

Focus Features

12. Sean Penn, “Milk”

Focus Features

13. James Franco, “Milk”

ABC

14. Eric Stonestreet, “Modern Family”

BuzzFeed.com: The best jokes from “Arrested Development” season four

Roadside Attractions

15. Ewan McGregor, “I Love You Phillip Morris”

Roadside Attractions

16. Jim Carrey, “I Love You Phillip Morris”

BuzzFeed.com: 20 types of people in line for the midnight movie

Focus Features

17. Julianne Moore, “The Kids Are All Right”

Focus Features

18. Annette Bening, “The Kids Are All Right”

BuzzFeed.com: Things celebrities did this week

HBO Films

19. Matt Damon, “Behind the Candelabra: My Life With Liberace”

HBO Films

20. Michael Douglas, “Behind the Candelabra: My Life With Liberace”

BuzzFeed.com: Meet Mr. Wall Street, Instagram’s newest insanely rich person