It might be hard for fans of the film to imagine anyone other than Mark Wahlberg as Dirk Diggler in Boogie Nights, but it was almost Leonardo DiCaprio. Written and directed by Paul Thomas Anderson and released in 1997, the film chronicles the rise of an adult film star in the 1970s along with his subsequent downfall in the 1980s. It is highly acclaimed and is considered to be a groundbreaking performance from Wahlberg.

Per The Playlist, Anderson recently spoke about Wahlberg's casting in the film on the Smartless podcast. He confirmed the rumors that DiCaprio had been offered the part and elaborates that the actor had spent several months mulling over the decision. The problem was that taking on teh role of Eddie Adams, aka Dirk Diggler, would have meant turning down a lead role alongside Kate Winslet in James Cameron's Titanic. As we know now, DiCaprio chose Titanic, though he was also the one who suggested Anderson go with Wahlberg for the part.

"That is very true that I asked Leo to be in Boogie Nights, and he spent many, many months agonizing and debating about it. Ultimately, what I came to realize, about halfway into that long decision-making process, is that he had a choice to make—either to do Titanic or to do Boogie Nights, and he chose to do Titanic. Which, in the long run, catapulted him into this massive worldwide fame, but on the other hand, I think possibly—we laugh about it now—but he regrets missing the experience and doing it."

Many would say DiCaprio made the right call, as Titanic was a Best Picture Oscar winner that earned widespread acclaim and remains one of the most successful movies of all time. It was the first movie to reach the one billion dollar mark at the box office, holding the record as the highest-grossing film of all time until Cameron surpassed it with Avatar in 2010. With subsequent re-releases, Titanic has earned more than $2.2 billion at the worldwide box office.

Related: Every Leonardo DiCaprio and Martin Scorsese Movie Collaboration, Ranked

Boogie Nights Is Also an Iconic Film, But Certainly Not as Profitable

Ricky Jay, Burt Reynolds and William H. Macy shoot a film in character during a scene from "Boogie Nights" (1997).
New Line Cinema

Along with Wahlberg in the lead, Boogie Nights included a strong ensemble cast featuring the likes of Julianne Moore, Burt Reynolds, Don Cheadle, John C. Reilly, William H. Macy, Philip Seymour Hoffman, and Heather Graham. It was acclaimed with its own recognition at the Oscars, scoring nominations for Best Original Screenplay for Anderson along with Best Supporting Actress for Moore and Best Supporting Actor for Reynolds. It topped $43 million at the box office against its $15 million budget, making it a hit, just not quite at the levels of Titanic.

All has turned out well enough for everyone involved. Wahlberg was able to really shine in the role thanks to DiCaprio doing Titanic instead, and both have since been enjoying successful careers in Hollywood. Even so, one can only imagine how different both films would be if DiCaprio had instead chosen to star in Boogie Nights, which would have forced James Cameron to find another actor for Titanic.