Jump to content

  • Log In with Google      Sign In   
  • Create Account

How do I get UVs to texture cube sphere?

  • You cannot reply to this topic
No replies to this topic

#1 Temeez   Members   -  Reputation: 108


Posted 26 August 2014 - 03:58 AM



I am trying to put textures on my cube which I have turned into a sphere, but alas the only thing I have gotten is a headache (I can't math).


Cube sphere code: http://pastebin.com/B6ijfdbf


I am fairly sure that I could apply my textures to the sphere following this tutorial: http://www.opengl-tutorial.org/beginners-tutorials/tutorial-5-a-textured-cube/ but I have absolutely no idea how to get those UV coords.


It could be that this: http://iquilezles.org/www/articles/patchedsphere/patchedsphere.htm explains it, but as I said, can't math.


I have searched all around the google and gamedev for a solution a long time and its starting to wear me thin, so I hope that someone can help me with this.


 - Temeez