titan
03-01-2003, 10:14 AM
I can't get rid of the artefacts on my models no matter how much I try. I'm using a the bounding sphere to create a view frustum that is very minimal to take full advantage of the depth range and I'm using a 24bit depth buffer with a 1024x1024 pbuffer.
I tried rendering with front face culling instead of back face culling, but I still had artefacts, just on the back of the model instead of the front.
Does anybody have any suggestions as to what I could try to completely remove the artefacts?
My first thought was that if just rendering the front facing polys gave errors on the front and rendering back facing polys gave errors on the back what I need to do is average them. With a closed model this will get a value in the centre of the object. It'll be slower because you render twice and then average, but that's ok if it is the only way to get rid of the artefacts. Is this a good idea?
I am working on that right now, but I'm stuck. I can't seem to get get glDrawPixels(w,h,GL_DEPTH_COMPONENT,GL_FLOAT,data) ; to work when I have switched to the pbuffer.
When I am calling drawpixel on either buffer I set my modelview to the identity, projection to identity and call glotho(0,1,0,1,-1,1); and set the rasterpos to (0,0,0,1); But it only works when rendering to the main buffer?
I tried rendering with front face culling instead of back face culling, but I still had artefacts, just on the back of the model instead of the front.
Does anybody have any suggestions as to what I could try to completely remove the artefacts?
My first thought was that if just rendering the front facing polys gave errors on the front and rendering back facing polys gave errors on the back what I need to do is average them. With a closed model this will get a value in the centre of the object. It'll be slower because you render twice and then average, but that's ok if it is the only way to get rid of the artefacts. Is this a good idea?
I am working on that right now, but I'm stuck. I can't seem to get get glDrawPixels(w,h,GL_DEPTH_COMPONENT,GL_FLOAT,data) ; to work when I have switched to the pbuffer.
When I am calling drawpixel on either buffer I set my modelview to the identity, projection to identity and call glotho(0,1,0,1,-1,1); and set the rasterpos to (0,0,0,1); But it only works when rendering to the main buffer?