title: Cubic to equirectangular projection algorithm
body: <p>I have a cube map texture which defines a surrounding, however I need to pass it to a program which only works with latitude/longitude maps. I am really at lost here on how to do the translation. Any help here?</p>
  
  <p>In other words, I need to come from here:</p>
  
  <p><img src="https://i.stack.imgur.com/UoMoY.jpg" alt="enter image description here"></p>
  
  <p>To this (I think that image has an aditional -90° rotation over the x axis):</p>
  
  <p><img src="https://i.stack.imgur.com/PC7T5.jpg" alt="enter image description here"></p>
  
  <p><strong>update:</strong> I got the official names of the projections. By the way, I found the opposite projection <a href="http://os.ivrpa.org/panosalado/downloads" rel="nofollow noreferrer">here</a></p>