🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

How to you make shader not show seams between objects?

Started by
2 comments, last by Ed Welch 2 years, 7 months ago

I have two objects that are flush against each other. When I render this in my game the seam between the objects shows as a thin white line. However, if I render it for my 3d content tool it shows no seam. Is there some opengl shader trick to avoid showing the seams between objects?

Advertisement

Ed Welch said:
Is there some opengl shader trick to avoid showing the seams between objects?

There was an option to disable compiler optimizations about reordering math ops, so different passes with different shaders still generate the same screenspace coords from equal vertices and matrices. But not sure if that's still relevant today, and maybe not related to your problem.
You probably want to post a screenshot. It sounds like some inaccuracy is involved, e.g. coming from combining matrices with numbers of big difference in magnitudes.
You may also want to test if the problem becomes worse the further away from the origin the objects are, which would hint at a precision problem.

Ah, I figured out what it was. It was a problem with mipmaps. When I added a border to the texture the line becomes barely visible. Thanks for the answer anyways. ?

This topic is closed to new replies.

Advertisement