People stand on the world's largest solar-powered boat in Cancun December 8, 2010. REUTERS/Gerardo Garcia After years of anticipation, the renewable energy revolution is finally here.

Solar energy is poised to become the dominant player in electricity markets worldwide moving forward, capturing a large share of the expected $12 trillion in investment between now and 2040, according to a new report from Bloomberg New Energy Finance. Geographically speaking, the vast majority of the $12 trillion in investment will take place in the Asia-Pacific region, driven, as usual, by India and China.

The report details the revolution that is just starting to get underway. By the middle of the next decade, utility-scale solar power will be competitive in most places around the world. The cost of solar has fallen by 75 percent since 2009, but costs are still going down. Over the next two and a half decades, not only will solar outcompete new fossil fuel plants – natural gas and coal – but solar will also start to edge out existing fossil fuel power plants.

That is significant because when the sunk costs of older natural gas and coal-fired power plants are taken into account, the cost of running the plants tend to be low. But in the years ahead solar will be even cheaper than that.

Moreover, it won’t just be utility-scale solar, which tends to offer cheaper power generation. The future of solar growth will take place in the residential rooftop segment. As energy storage becomes cheaper and more accessible – thanks to innovations like Tesla’s home battery pack – decentralized solar becomes not only viable, but the preferred option. In 2040, decentralized rooftop solar will be the cheapest form of electricity in “every major economy,” even cheaper than grid power, according to BNEF. Individuals generating their own power on their rooftops, with battery storage for use at night, will become the norm.

Most striking is the fleeting prospects for natural gas, which has been seen to be “revolutionary” in its own right. The vast reserves of shale gas in the U.S. – and indeed around the world – may not matter. BNEF predicts that outside of the U.S., there will not be a massive dash for gas. But even within the U.S., the shale revolution runs out of steam as renewables overtake gas (in terms of new capacity) on cost by the mid-2020s. The role of natural gas as a “bridge fuel” may end up being a relatively short one.

Renewables increasingly make up the vast majority of new power plants. BNEF predicts that the world will be adding over 200 gigawatts of new solar each year by 2040, compared to just 60 gigawatts of fossil fuel generation (gas, coal, and oil combined).

This is all to say that in the very near future renewables will be the preferred choice for power generation, not the niche or marginal sector that it had been for years. After more than a century of fossil fuels dominating the electric power sector, the next two decades will usher in a new era.

Nevertheless, the transition may not be quick enough to avoid the worst effects of climate change. Although solar and wind take over the lion’s share of new generation, legacy fossil fuel plants stick around for quite some time. Under BNEF’s projection, fossil fuels relinquish their grip only slowly, seeing their market share drop from two-thirds in 2014 to 44 percent in 2040. In other words, utilities may start building fewer coal and gas plants, instead opting for wind and solar, but they hold onto the fossil fuel plants that are already built.

As a result, global greenhouse gas emissions in 2040 end up being 13 percent higher than today. That means the world will blow through its 2-degree Celsius target.

The future then looks bright for renewables, but unless governments around the world dramatically step up their efforts to reduce greenhouse gas emissions, the effects of climate change will still continue to get worse.