Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Seam visible when drawing textured quad

Mon Aug 27, 2012 10:48 am

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?

blu
Posts: 55
Joined: Tue Jul 17, 2012 9:57 pm

Re: Seam visible when drawing textured quad

Mon Aug 27, 2012 10:54 am

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)?

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Seam visible when drawing textured quad

Mon Aug 27, 2012 11:06 am

I'm halfway through recoding to try exactly that. And yes, I'm using GL_TRIANGLES currently

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Seam visible when drawing textured quad

Mon Aug 27, 2012 2:14 pm

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!)

blu
Posts: 55
Joined: Tue Jul 17, 2012 9:57 pm

Re: Seam visible when drawing textured quad

Mon Aug 27, 2012 6:59 pm

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?

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Seam visible when drawing textured quad

Mon Aug 27, 2012 11:57 pm

Everything is a float. Texture coords are in 0->1 space

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Seam visible when drawing textured quad

Mon Aug 27, 2012 11:58 pm

Haven't tried a fan, but yes, exactly the same in the other two cases.

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: Seam visible when drawing textured quad

Tue Aug 28, 2012 9:30 pm

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

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Seam visible when drawing textured quad

Tue Aug 28, 2012 10:01 pm

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?!

jmacey
Posts: 135
Joined: Thu May 31, 2012 1:05 pm

Re: Seam visible when drawing textured quad

Tue Aug 28, 2012 10:04 pm

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?

Return to “OpenGLES”