Matt Bomer has signed on to star in playwright Tim McNeil's Anything, where he'll play a transgender sex worker, Variety reports.

Based on McNeil's play of the same name, the film centers on a Mississippi man (played by John Carroll Lynch) who moves to Los Angeles after the tragic death of his wife. Depressed and suicidal, the widower meets and begins an "intense friendship" with Bomer's character, a transgender woman, and the two "reconcile their vastly different backgrounds as they fill the void in each other's lives."

Avengers actor Mark Ruffalo, who is an executive producer on the "daring" project and co-starred with Bomer in The Normal Heart, told Variety that "love is at the essence of great storytelling and [the film] transcends all discrimination and politicization."

As a cisgender man, Bomer, who has previously starred in TV shows and movies like Magic Mike, White Collar and American Horror Story, will join the ranks of actors including Eddie Redmayne (The Danish Girl), Jared Leto (Dallas Buyers Club) and Jeffrey Tambor (Transparent) who have portrayed transgender women on screen.

However, the role may have an even deeper meaning for the actor due to personal experience. Speaking with "Lunch With Bruce" on SiriusXM in August, Bomer revealed that it was a transgender woman he met early on in his career who inspired him to come out as gay.

"I was working at the Utah Shakespeare Festival after my sophomore year of college, and we had a hair and makeup artist who was a transgender girl and did the entire company’s hair and makeup. She did shows when she was very dolled up, but in her day-to-day life she lived very simply, and she was raised in a Mormon family, which was very conservative," he shared.

"Growing up it was very hard for her," Bomer added. "To hear the trials and tribulations she had to go through as a Mormon person who really felt like she was born in the wrong body, I really felt like, 'My god, if this person can really look this deeply into themselves, what am I turning a blind eye on?'"

21 Inspiring Stars Who Have Come Out: