Page 1 of 1

Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 10:48 am
by Twinkletoes
I'm drawing a textured quad full screen as triangles using ES2.0 (4 vertices, 6 indices).

I'm seeing a single pixel bright line along the seam between the two triangles. Every google result I get suggests this is due to Polygon Smoothing, but this feature is not available in ES2.0, so it can't be that!

Any thoughts?

Re: Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 10:54 am
by blu
Sounds peculiar. Is that a trilist you're drawing (i.e. GL_TRIANGLES)? If so, is the artifact still there if you used a tri strip/fan instead (GL_TRIANGLE_STRIP/GL_TRIANGLE_FAN)?

Re: Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 11:06 am
by Twinkletoes
I'm halfway through recoding to try exactly that. And yes, I'm using GL_TRIANGLES currently

Re: Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 2:14 pm
by Twinkletoes
Yup. Same problem with both TRIANGLES and TRIANGLELIST. Although not on every layer - just the background. Searching to see if I can see any rogue draw calls. (and yes, I've checked the texture image - it doesn't have the bright line on it!)

Re: Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 6:59 pm
by blu
So you get the same artifact in all three cases - GL_TRIANGLES, GL_TRIANGLE_STRIP and GL_TRIANGLE_FAN?

What types are your vertex attributes for that mesh, particularly the texture coordinates?

Re: Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 11:57 pm
by Twinkletoes
Everything is a float. Texture coords are in 0->1 space

Re: Seam visible when drawing textured quad

Posted: Mon Aug 27, 2012 11:58 pm
by Twinkletoes
Haven't tried a fan, but yes, exactly the same in the other two cases.

Re: Seam visible when drawing textured quad

Posted: Tue Aug 28, 2012 9:30 pm
by jmacey
how are you defining your texture?

glTexImage2D ( http://www.opengl.org/sdk/docs/man/xhtm ... mage2D.xml ) has a paramater called border make sure that is set to 0 else you will get a single pixel border. I've done this before ;-)

Jon

Re: Seam visible when drawing textured quad

Posted: Tue Aug 28, 2012 10:01 pm
by Twinkletoes
My line is diagonal across the middle, so it's not the texture border. OK - that's weird. It's at right angles to the triangle edge. Huh?!

Re: Seam visible when drawing textured quad

Posted: Tue Aug 28, 2012 10:04 pm
by jmacey
As you are using ES2.0 set the colour to the UV value in the shader and see what that does I use this to debug UVs from time to time. Can you post and image?