Jump to content
  • Advertisement

Archived

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

TheProphet

Crappy striated textures

This topic is 5609 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
Advertisement
Yes, that is the case.
But how could I fix it ? I guess I should change the depth buffer precision, but I don''t know how...

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
Well, I have tried to pu the near plane far from the eye, and get the far plane closer. But the problem is still present...

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
Oui, biensûr, mais je la change à un autre endroit dans le programme.

Yes, of course, but I change it in another function in the program.

Share this post


Link to post
Share on other sites
Why do you change the front face definition instead of choosing to cull front or back faces depending on the context ? ;*)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!