Archived

This topic is now archived and is closed to further replies.

Crappy striated textures

This topic is 5242 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have a texture problem. I have written a tool and there are some textures problems like this one : http://dgk.free.fr/ss0000.jpg http://dgk.free.fr/ss0001.jpg I think it is not really a problem, but just some bad options in OpenGL. Could someone help me ?

Share this post


Link to post
Share on other sites
It''s probably Z fighting. You have two polygons that are close in depth and the resolution of your z buffer is too low, making z testing a bit iffy.

Try increasing the resolution of the z buffer by either increasing the number of bits allocated to it or by reducing the ratio of your far plane to near plane (i.e. decrease the far plane or increase the near plane) to see if it disappears.

Share this post


Link to post
Share on other sites
Are the overlapping polygons facing the same direction ?
Or are they representing both sides of the cloth ?

You could try to enable back (or front if you prefer) face culling in this case.
Modifying the depth buffer parameter will only workaround the problem. Artifacts will still show on low-end/old gfx cards (TNT2...).

Share this post


Link to post
Share on other sites
Enabling bacface culling with
glFrontFace(GL_CCW);
glCullFace(GL_BACK);
solves the problem (not entirely since I lose some information, but no matter for the moment).
I think it will be the solution I will buy

Effectively, changing the depth of the zbuffer will only workaround the problem - I have tried.

Thanks

Share this post


Link to post
Share on other sites
my program is divided in several parts; some of them need to change the glFrontFace. So here I don''t change the front face definition, I just put it back to its initial value.

And how do you want to choose "depending on the context" ?
If I knew before rendering which face is behind, then I would have had that problem...

Share this post


Link to post
Share on other sites