I was talking to an environmentalist friend last week about the uneven outcome of the COP26. It came. It went. What did it achieve? Did it keep 1.5 alive? Maybe it's so big we can't see it yet?Big business has finally got the message.

“If I were a young climate campaigner wanting to make a real change”, I said, half seriously” I would join a bank, or better still a big energy company, because they're the people who are going to engineering and financing the transition to green energy”. Climate campaigners like to think of themselves as socialists, dedicated to the abolition of capitalism. They are about to discover that the transition from fossil fuels is the biggest capitalist enterprise since the industrial revolution.

I don't think he was convinced. The fossil fuel companies don't exactly have a track record of environmental responsibility. Then came news of Shell's decision to turn its back on 800 million of barrels of oil in the Cambo field off Shetland. It is one of those epic moments that tell you that reality has changed. For one of the biggest energy companies on the planet to turn away from a new field with 25 years of production potential - and one which has already been licensed since 2001 and factored into the UK government's green transition plan - is extraordinary.

Green activists are claiming this a victory for people power, with justification. Cambo was a brilliant campaign. The Scottish Green leader, Patrick Harvie, claimed somewhat disingenuously that Cambo oil is all exported and therefore could not be used to replace oil imports from countries like Russia. In fact much North Sea oil comes back from the Netherlands as refined oil products because the UK lacks refining capacity here. Cambo wasn't “the wrong kind of oil”.

However, Shell did not turn its back on Cambo just to get green brownie points, if you'll excuse the mixed metaphor. The company said its decision was based purely on commercial grounds. It intends to concentrate on its existing fields in the North Sea, like Brent, which are nearing exhaustion, and on the world's first large scale floating wind farms off the North East of Scotland.

Most of the big fossil fuel companies – BP, Total, Equinor – are in the same game: demonstrating that only the oil industry has the knowhow to develop renewable energy projects like offshore wind and carbon capture. That's where the money is in future as the sun sets on fossil fuels.

Big Oil also fears that if the forecasts are right and global warming is leading to climate chaos, they will be the ones blamed. After it was finally established in the last century that smoking causes cancer, tobacco companies were served with hundreds of class actions from individuals and governments demanding compensation. It cost hundreds of billions in settlements in litigation which continues to this day.

But it isn't fear of litigation that is really driving this development, but something more fundamental still: shareholder value. The global asset-management company, BlackRock has been warning that up to $80 trillion are becoming what are called “stranded assets”, mainly in coal, oil and petrochemical processing. A year before COP26, BlackRock’s C.E.O., Larry Fink, told investors to that climate change has now put us “on the edge of a fundamental reshaping of finance, a watershed moment in climate history”.

This is what the former governor of the Bank of England, Mark Carney, was talking about in Glasgow when he said that $123 trillion in asset value was lining up behind the transition to renewable energy. Not that this sum of money is actually on the table, in hard cash, but that a tectonic shift has begun in world stock markets away from the fossil fuel economy. You know that the environmental case really has won when capitalism turns green.

Estimates of the actual cost of global transition range from $70 and $100 trillion, according to the International Energy Agency, over the next 29 years. Only a fraction of that is going to come from governments, from taxpayers. The vast majority of the investment will come from private sources: from sovereign wealth funds, pension funds, asset management companies, investment trusts, hedge funds and from energy companies themselves.

You need only look at the Dogger Bank wind farm, being built by Equinor, to understand the scale of this investment. 600 wind turbines, each as tall as the Eiffel Tower, capable of producing enough electricity to power a country larger than Scotland. There will be thousands of these being built across the world

The International Energy Agency says that Net Zero will not be achievable without breakthroughs in hydrogen (to power large machines like ships) and Carbon Capture and Sequestration (CCS) which involves scrubbing CO2 from the air. There is already too much greenhouse gas in the atmosphere, and with China still building new coal power stations every week, it's only going to get dirtier.

CCS could be the energy companies' next biggest break. If they can crack it – make it work economically - they will be seen, not as the baddies who tried to cover up the environmental impact of fossil fuels for decades, but global heroes. They see how the big pharmaceutical companies have transformed the public image of Big Pharma from purveyors of dodgy opioids into saviours of the world thanks to Covid vaccines.

And it's all happening here in Scotland – or rather it should be happening here. Scotland is blessed with weather and something like 20% of Europe's offshore wind potential. We also have valuable oil and gas reserves, which will still be required during transition. Plus exhausted oil fields suitable for CO2 storage and the pipelines to pump it there.

Alex Salmond was right: Scotland is the Saudi Arabia of renewables. It's like North Sea Oil all over again. Only this time the SNP can't claim that Scotland has been robbed by the UK. For various reasons, essentially the lack of a coherent industrial policy, Scotland is not benefiting from the greatest potential jobs bonanza in history. Deputy First Minister, John Swinney, said in 2010 that offshore wind energy would create 28,000 posts by this year. It has delivered fewer than 2000.

History is repeating itself. The mining industry employed nearly100,000 Scots in the middle of the last century – entire communities built on coal. That all went after Margaret Thatcher defied the miners strike in 1984. It was brutal, but perhaps inevitable. The same may be about to happen to the 100,000 or so who are employed in the oil and gas industry. Many have already left the industry for work abroad, in Australia or the US.

It's an old story: Scotland's biggest export has always been its people. And there will be consequences. A great industry doesn't go down without a fight, and Nicola Sturgeon better believe that she will be reviled in the North East if she doesn't find some way making green jobs a reality. Otherwise she will go down as the Margaret Thatcher of Scotland's Oil.