>>epista+Di
Technically it depends on the levelized cost of hydrogen, which encompasses capex, opex, and a slew of other relevant inputs. Similar "levelized cost" formulas are used throughout the utility sector to make these kinds of decisions; what makes green hydrogen unique is simply that it is undergoing a spike in research and development right now that is drastically changing some of the inputs to the LCOH equation.
https://www.nrel.gov/docs/fy09osti/46267.pdf