vertex/texture coordinates screwy

Posts: 320
Joined: 2003.06
Post: #1
Howdy all... long time no see... havent been coding that much lately, though still puddling around with Chopper2 when I find the time.

which brings me right on to my problem...

I'm seeing gaps on the edges of my terrain tiles which you can see as a line of water in the following image:

[Image: precision.jpg]

sometimes these gaps can be up to 3 or 4 pixels wide which equates to about 0.1 in openGL units. I'm also seeing textures move around within the terrain tiles, which is very noticeable, and quite a few single pixel gaps at very far away distances ( 10,000 units or so). These are all not in permanent places, but move as the camera moves.

so is this a precision problem do you think? Seems to me that GLFloats should be able to handle 0.1 units, and I'd hate to go to doubles as memory requirements are already high, but I'm at a loss as to what else could be the problem.


Chopper, iSight Screensavers, DuckDuckDuck:
Quote this message in a reply
Posts: 184
Joined: 2004.07
Post: #2
I don't think this is a precision problem with floats- something else is probably not quite right. Presuming you are using the exact same vertices for your different ground triangles, another thing you may want to make sure you're using GL_CLAMP for the edge of your textures (that should at least help, though if textures are shifting around a little they may still shift.) Definitely more information about how you compute your texture coordinates and vertex positions would be useful.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  openal coordinates vs. opengl coordinates gerald 1 7,527 Feb 3, 2011 10:04 PM
Last Post: OneSadCookie
  Vertex Texture Fetch (VTF) confirmation? m3the01 1 3,129 Feb 12, 2008 04:14 PM
Last Post: m3the01
  Integer texture coordinates. Skorche 5 4,729 Apr 28, 2005 10:49 AM
Last Post: Puzzler183
  openGL screwy edges of textures reubert 8 6,472 Jun 20, 2003 11:06 PM
Last Post: OneSadCookie
  Texture coordinates on trianglestrips designdb 7 7,012 May 22, 2003 09:34 AM
Last Post: designdb