The shots just kept coming from Iman Shumpert. They kept going in. But it wasn’t enough.

In the Knicks’ 106-99 season-ending Game 6 loss to the Pacers last night, it was Shumpert who delivered a surge that nearly saved the Knicks’ season.

Midway through the third quarter, Shumpert almost singlehandedly brought the Knicks back from 10 points down with not one, not two but three straight 3-pointers on three straight trips down court.

It was an a major eruption for the second-year Knick. Shumpert, who finished with 19 points, poured in 16 in the third quarter. He tied it at 79-79 later in the third quarter with a fourth 3 — as he and Carmelo Anthony racked up a ridiculous 31 of the Knicks’ 34 third-quarter points.

“We wanted to put ourselves in the finals and roll the dice and we didn’t do that,’’ Shumpert said. “I just wanted to win.”

Shumpert’s explosion came out of nowhere. He had been limited in the first half by foul trouble, playing just 6:33 because three personals. He had scored a total of five points in the game and the Knicks were down 70-60 with 5:23 left in the third quarter, their season looking finished.

Shumpert then sank a three from the wing, cutting the lead to 70-63. On the Knicks’ next possession, Raymond Felton’s offensive rebound resulted in the ball being in Shumpert’s hands again, and he drained another 3-pointer from the wing, trimming the lead to 70-66.

On the next possession, Shumpert dropped in a 3 from the top, the lead down to 70-69 that put the Knicks in a prime position to force a Game 7.