Crappy striated textures
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 ?
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...
But how could I fix it ? I guess I should change the depth buffer precision, but I don''t know how...
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.
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.
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...
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...).
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...).
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
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
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.
Yes, of course, but I change it in another function in the program.
Why do you change the front face definition instead of choosing to cull front or back faces depending on the context ? ;*)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement