Results 1 to 10 of 10

Thread: OpenGL Texture Mapping [Equirectangular 2 Azimuthal Equidistant]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Default

    With a quick look its hard for me or anyone to be too precise about a solution but from a glance here I would say that n your first post you have atan( ... ) where the ... is some func of x/y but usually you use atan with some func of y/x. Whether that's right or not in this case tho I don't know.

    From the second post you can use GL_REPEAT with OpenGL or you can mod the texture coord yourself. I think in your case changing the coord would be better. To do this for getting into the principle range from a -ve value you normally add on a repeat value and then call fmod( x ) where x is the repeating amount.

    But looking at the image I dont think that is your issue. What it looks like to me is the gourand shader for opengl where it will linearly ramp the texture coord from one vertex to another. If you have texture coords that run from say 0 to 1 around the globe and your last face has vertexes with texture coord of 0.95 on the left and 0 on the right then that last face is going to shade the whole texture map around. What you need is probably a duplicated set of vertices on the seam with a texture coord of 1.0 so it maps back to the 0. I.e. you now have 0.95 on the left and 1.0 on the right.

    If you set the normals to be radial then it should blend perfectly. If you use a texture map with the extra border pixel duplicated then it will antialias correctly as well.

    Well thats my my best guess from looking at it.
    Last edited by Redrobes; 07-26-2012 at 05:07 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •