Solar is exciting. Cheap solar is even more exciting. In fact, the increasing cheapness of solar is the most reliable good news story out there, when you happen to write about climate change.

Yeah, well, not so fast, says Michael Liebreich and Charles Blanchard, over at Bloomberg New Energy Finance. You want to know what else has fallen dramatically in cost over the last few years, besides solar? Drilling for oil and gas, that’s what.

The surprising fact is that in the U.S., oil and gas unit costs have come down about as rapidly as solar power costs over the past five years … It is not just that costs are going down – output is going up. The number of operating rigs in the US is down more than 40 percent from the peak, but production per rig has increased ninefold since 2010.

Or, as Blanchard puts it, “Do not ever think that Texans, Oklahomans and Louisianans are lazy hee-haws, sitting on their butts, waiting for oil to spurt out of the ground.”

Grist thanks its sponsors. Become one.

… Improvements in technology and productivity did not stop there. The longer the lateral, the more oil or gas you can access from one location, so lateral length is going up. Down-hole, operators experiment with different and new chemicals, changing proportions of water and sand, and with agents that would increase or decrease viscosity: more viscous is better for getting the sand into the fractures and holding them open – less viscous is better for blasting apart the rock in the first place. Operators are using micro-seismic equipment to verify what is working and what is not. Up-hole, new rigs are able to use the pressure of wellbore mud to rotate the drill bit, eliminating the need for drill pipes. The latest rigs are powered, so they can literally get up and walk from one part of the pad to another.

Blanchard has challenged the rest of the Bloomberg New Energy Finance team to show him anything in their sectors as cool as a 400-ton machine drilling a hole 12,000 feet down, 10,000 feet across, and then getting up, walking 50 feet away and doing it again. A 6-megawatt offshore wind turbine is pretty cool too, but they get Charles’ point.

Grist thanks its sponsors. Become one.

In other words, the duo concludes, technological innovation alone isn’t going to declare solar the winner — unless solar manages to drop to the equivalent of $20 per barrel. Right now we’re at about $50 a barrel — which is a lot lower than it takes for most American oil operations to make a profit, and has definitely put an end to the boom in the Alberta tar sands. But the price of gas is still high enough that other countries with more accessible reserves can drill for it and turn a profit, while low enough that sport utility vehicles can start making a comeback.

That’s OK. If solar can’t win on the basis of cost alone, it can win with rule-making. This is why the Climate Action Plan, the White House’s latest climate legislation, is a big deal — it’ll make dirty fuels difficult to burn even if prices bottom out.

All of this reminds me of the end of whaling. I used to think that whaling on a large scale came to an end in the early days of the oil industry, in the late 1800s, when people figured out that it was much easier to dig up and refine petroleum than it was to go chasing whale oil, which happened to be located inside a large, sentient animal that was pretty good at smashing things. Instead of giving up on whaling, though, people strapped the new petroleum-driven engine technology onto boats: Now that it was easier to catch up to whales, they could kill even more of them. Which they did, even if the only market for the carcasses was pet food.

It took from 1925 to 1986 before a worldwide moratorium on commercial whaling went from an idea to an actual thing that multiple countries agreed on. That moratorium wasn’t perfect. Any worldwide rules we create to regulate carbon emissions won’t be, either. But they will make a difference in a way that technology alone can’t. Research and innovation can drive down the price of solar — but it will take science and politics and economics all working together to get us to renewable heaven.