Chloë Grace Moretz is the star of an upcoming Desiree Akhavan-directed film based on a novel by Emily M. Danforth called The Miseducation of Cameron Post.

Tackling themes of homophobia, the movie is based on the story of a character played by Moretz named Cameron Post who is sent to a gay conversion therapy camp by her religious family after she's caught having sex with the prom queen. 

On Tuesday, FilmRise released a trailer that follows Moretz' character as she visits a religious camp called "God's Promise" where employees are tasked with "curing" her sexuality. At one point, a voice is heard telling her, "You are at an age where you are especially vulnerable to evil."

Explaining the real-life origins of the story, Danforth tells Slate, "I knew that I wanted to write a coming of age novel. Then I came across this Zach Stark controversy. Zach Stark was a 16-year-old who posted on his MySpace wall that he was being sent to a de-gaying camp, which is how he put it, by his parents, and then he posted the rules of this particular facility and what kind of clothing he could wear, what kind of music he was allowed to bring, those sorts of things."

"First it was passed around with his friends, and then it got passed around to activists on both sides, and at some point, someone emailed me about this and said, 'You can go see this thing on the kid’s [Myspace] wall.'" Danforth continues. "There was a postcard campaign to get [the camp] shut down. I think he was getting messages about, 'I’ll meet you outside your house in an unmarked van. Your parents are not fit to be parents.'"

The Miseducation of Cameron Post is set to hit theaters in select cities on August 3. Watch the trailer up top.