Investments almost work on a loss leader model - while there is still decisions made on who to invest in (some VC firms/investors/angels making wiser decisions than others), they are still banking on the small percentage of those investments actually making a return on investment. This return covers the failed investments that they might eventually write off.
The general rule is 1/3rd of investments will fail, 1/3rd of investments will under perform and 1/3rd will meet expectations - and to put that in to a better perspective, "expectations" should be read as a 5x to 10x return on investment. A better firm might be able to skew that more to the successful side, while another firm might be more on the failure side.
I don't think the money will "run out" - but the better firms (think USV, Sequoia, Accel, etc) will continue having the experience in finding successful startups and the smaller firms might just not see the return on interest and exit the game.
The money will definitely slow down if the return from the industry as a whole (the industry being SaaS and web apps) is less than the investment levels put in. It's worth remembering that while the initial investors in Facebook have seen amazing returns which will subsidise other investments for decades to come, those returns are only because the hype in the industry as a whole has lead other people to buy into facebook. Facebook itself has fairly low revenues and they're struggling to grow them. Equally while anyone who'd invested in instagram would have walked away with a nice sum, the money to fund that acquisition came from the same Facebook investment.
There's a lot of hype about "tech" (in this context really only web apps) which has lead to a lot of money pouring in from people desperate to grab a slice of the pie. The reality is that while web apps and SaaS is a large industry, the size of the investment funds targeting the industry is due to hype and investors saying "me too" rather than a reflection on the available revenues. You have to look at even the success stories in this context.
The money won't run out completely, but if the money from investors late to the party slows down then the value of the successful web apps will fall to levels which reflect their revenues.
The general rule is 1/3rd of investments will fail, 1/3rd of investments will under perform and 1/3rd will meet expectations - and to put that in to a better perspective, "expectations" should be read as a 5x to 10x return on investment. A better firm might be able to skew that more to the successful side, while another firm might be more on the failure side.
I don't think the money will "run out" - but the better firms (think USV, Sequoia, Accel, etc) will continue having the experience in finding successful startups and the smaller firms might just not see the return on interest and exit the game.