Ryan Reynolds paid out of pocket for Deadpool so he could have his screenwriters on set. And the gamble paid off.

It's not often someone volunteers to give up a salary for others, but Variety reports that's what the star did, according to the New York Times. In the first movie, he paid out of pocket to keep Rhett Reese and Paul Wernick around during filming.

Ryan Reynolds on bringing writers on set for Deadpool

“No part of me was thinking when Deadpool was finally greenlit that this would be a success,” Reynolds said. “I even let go of getting paid to do the movie just to put it back on the screen: They wouldn't allow my co-writers Rhett Reese and Paul Wernick on set, so I took the little salary I had left and paid them to be on set with me so we could form a de facto writers room.”

“It was a lesson in a couple of senses,” the star added. “I think one of the great enemies of creativity is too much time and money, and that movie had neither time nor money. It really fostered focusing on character over spectacle, which is a little harder to execute in a comic book movie. I was just so invested in every micro-detail of it, and I hadn't felt like that in a long, long time. I remembered wanting to feel that more — not just on Deadpool, but on anything.”

Reynolds was humble about the success of Deadpool and said he wasn't that “well-known” before the film's rise to fame.

“I was an actor who was semi-well-known,” he said. “I don't know how you would phrase that without sounding like a dink. But I was 37 when Deadpool had its pop-culture phenomenon moment, and I'm really grateful I was because I knew exactly how to enjoy it.”

When the first Deadpool came out, he was in a hotel in L.A. that overlooked the city. He said that this was “the place that I'd been busting my ass for 18 years at that point.”

“Those young actors, I don't know how they deal with it,” he continued. “I've got a tremendous empathy for those folks who have to process something that is not possible to process at that age before your cerebral cortex is even developed.”

Reynolds also noted how the Deadpool and Wolverine story came together.

“I don't want to overplay the idea that I would sit down and hammer out a whole 120-page screenplay each time I believed in something, but yeah, I wrote lots of treatments and different versions,” the actor revealed. “It was just hard to land a story idea that felt right to Marvel. Ironically, the first pitch I had five or six years ago with Kevin Feige was a Deadpool-and-Wolverine movie. It's always the thing I want. Even when I saw that first trailer for Logan, I wrote a short that went in front of it [the movie]. I wanted to orbit that movie in any way I could, even if it meant stealing the spotlight for the first two minutes before your premise even rolled.”

All the hard work has sure paid off. Be sure to catch Ryan Reynolds in Deadpool and Wolverine when it hits theaters on July 26.