How do I fix these texture seams?

Started by
2 comments, last by Jonny K 19 years, 11 months ago
Here''s a screenshot: http://www.telusplanet.net/public/kord/misc/screen.png The background is composed of textured tiles (quads) that load one at a time next to each other just off screen, and animate slowly down until they are out of sight. I found that even with an overlap of the tiles I still get seams. When I set the filtering to "GL_NEAREST", they go away mostly...although the occasional flicker is seen on the seams. If I run "GL_LINEAR" filtering (in the screenshot), I get seams conststantly (with no flicker). I''m also using "GL_CLAMP" mode on the textures. I read something about drawing the textures so that one pixel overlaps...but I can''t draw on a pixel basis in this program, drawing is done by coordinates in a (0,0) to (1,1) area. For instance, X = 0.5 and Y = 0.5 (center of screen). When a new tile is created, it is added just above the last one, so Y = 0.5 + 0.6 (Current Y position of tile + tile height = position of the center of the next tile). Any ideas? Thanks.
Advertisement
Try using GL_CLAMP_TO_EDGE instead of GL_CLAMP. It''s the "proper" and easiest way to do what it does. It was added in OpenGL 1.2, so if your OpenGL implementation is out-of-date, you''ll have to use it as an extension (nothing difficult).

Well, I''ve got the "out of date" Microsoft 1.1 version of OpenGL, so...how do I use extentions? I have no experience with them.
Ok, I figured it out, downloaded the extra header file I needed, and used GL_CLAMP_TO_EDGE.

It''s nearly perfect now. I still see the occasional seam shimmer though (as I did with NEAREST filtering). Any fix for that?

Thanks.

This topic is closed to new replies.

Advertisement