ortho2d poly intersection artifacts

Sorry if this is a beginner question but I’ll have you know I already banged my head against the GL spec reference and googled for weeks on this problem.

I have an ortho2d projection matrix with the parameters as so:

I’m drawing/scrolling two large quads together and there are visible artifacts. They are more visible on lower end machines (On my GF3 you can barely notice it)

I have everything disabled (stencil test, depth test, blending, lighting) because it is 2d… and I am only using immediate mode calls for now. Everything looks good except for the line where the two polys meet.
(BTW I’m using 43.03 drivers but it has shown up with a few different systems and drivers anyway)

[This message has been edited by deadalive (edited 04-14-2003).]


You have depth test disabled and still you see artifacts at the intersection line? Weird. Could you maybe post a screenshot demonstrating the problem?


Hmm, well a screenshot wouldn’t do much for you, it isn’t visible unless it’s moving around.

I don’t know if it’s “artifacts” per-se, it only happens when it scrolls, and it seems to be less noticable when scrolling at different rates.

Maybe it’s a sloppy time-based movement function…?

When I changed these from GL_REPEAT to GL_CLAMP it seemed to help a little, but not enough:


Could it be some kind of stencil buffer problem? I have that disabled, and the alpha test too.

[This message has been edited by deadalive (edited 04-15-2003).]

Ok, I think the problem is that the texture edges don’t line up correctly. Make sure that your textures have the exactly same colors on the edges that are supposed to be together. In addition to this, use GL_CLAMP_TO_EDGE and disable mipmapping. That should be enough to ensure a clean edge.


Hey thanks! I didn’t even think of that, I haven’t tried it but it sounds like it should do the trick. I’ll try it when I get home.

It worked like a charm! THANK YOU!!
You don’t even know how much that helped me!

[This message has been edited by deadalive (edited 04-16-2003).]