Advertisement

Why me? (texture question)

Started by April 06, 2001 01:54 AM
4 comments, last by Sordith 23 years, 7 months ago
I (like everyone else) recently created a terrain rendering program. I had one large texture covering the whole thing, and it worked out fine. I wanted more detail, so I split the terrain into four sections, created a texture for each, and tried rendering the four sections next to each other. When two textures meet, It''s showing a seam (in green, one of the colors of the texture) which isn''t in the texture itself (meaning, when viewing the texture the left, for instance, will be grey but when mapped to the mesh, a small horizontal strip of green will show up). The problem persists if I remove three of the four sections so I''m sure there isn''t an overlap. I''ve also checked to make sure that the texture coords for the triangles on the problem sides are correct. Is there a small offset by default in OpenGL textures?
hi!

i can not really help you. but i think it is a filtering problem try GL_NEAREST in case of GL_LINEAR and all will work fine ( i only suppose that it will work fine )
http://trigger.xenyon.net/
Advertisement
Seems like the bordersize is wrong.
Bordersize?
Not too sure, but you may want to use GL_CLAMP.

glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); // Should prevent texture artifacts
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); // ditto
Thanks for the help guys...

Shadwdrak, your fix worked. Would you mind explaining GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T to me so I may learn from my mistakes?

Thanks again to all who posted.

This topic is closed to new replies.

Advertisement