Sign in to follow this  
Desa

missing pixels

Recommended Posts

Sometimes when drawing a mesh I get a few empty pixels in certain rotations. Here is a screenshot. I'm drawing this example using glDrawElements and GL_TRIANGLES. Thanks for any advice you can offer.

Share this post


Link to post
Share on other sites
T vertices:
http://www.cs.princeton.edu/courses/archive/spr98/cs598d/lectures/alejo/sld002.htm

See that the edge of one triangle goes right across the vertex in the center. It should instead stop there and form another triangle.

As for your original problem not quite sure. Can you do an image in wire frame?

glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
// render mesh

Share this post


Link to post
Share on other sites
I had / have a very similar problem:

You can see it here:
http://www.iced-liquid.com/media/glow_cubes/screenshots/GlowCubes-ScreenShot4.jpg

On the trailing edges you have white pixels. (Ok the are hard to spot in the screen shot, but you see them like hell when they move and flicker.)

Same here you have the "broken pixels" on the trailing edges.

In my case I used a early Z-rejection pass; i.e. I filled the z-buffer with a quick depth only pass. The subsequent color passes made depth test misses in those places. Not filling the z-buffer "fixed" the problem, only now I have a 20% speed decrees.

I don't know if you are using multi-pass rendering algorithm, so my guess is check your depth test function. Is is properly GL_LEQUAL and cleared every frame. Does the problem change when you rotate the mesh?

Edit:

Look at your line rendering, at the intersections you have white pixels. Check your depth function.

Share this post


Link to post
Share on other sites
Nanoha: Yes, they are shared. That above example is using GL_TRIANGLES but I've also tried rendering strips of GL_TRIANGLE_STRIPS to create the surface but I still get the missing pixels.

rioki: Thanks for replying! Yes, the pixels will go away and come back as I rotate the mesh. I am using GL_LEQUAL and clearing the depth buffer with every frame.

I also just tried disabling the depth buffer completely and the problem is still there. Could you describe more what you did to fix the problem?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this