PDA

View Full Version : Depth buffer artefacts on Geforce 2 hardware



cix>foo
03-20-2001, 02:32 PM
I'm rendering a landscape with multiple textures scattered about it. This means I can't use triangle strips and I can't sort the triangles by depth order (without changing texture units nearly every triangle). Instead I'm sorting by texture changes and rendering triangles willy nilly with the depth buffer turned on.

However, I've noticed a nasty flickery artefact whilst rendering. Whilst completely still, the triangles kind of overlap slowly with each other in certain awkward areas, such as points on mountains. It looks like the depth buffer values are changing each frame by a tiny amount and cycling round a set of values.

What's up? How can I make them be the same every frame? So at least it's wrong but statically wrong rather than glitching annoyingly.

And then - has anyone got a better way to do this which avoids the depth buffer's precision problems? I ask because I want to do multiple passes and blending's a no-no if there's overdraw...

Cas http://www.opengl.org/discussion_boards/ubb/smile.gif

zed
03-20-2001, 04:43 PM
just increase your near clip planes value or use a 24bit depth buffer

cix>foo
03-22-2001, 01:51 PM
Already using a 24 bit buffer, but my near clip plane is set to 1... I'll experiment with bigger numbers. Ta.

cix>foo
03-26-2001, 04:15 AM
Zed,

thanks a 1000000. I suppose it was a little unrealistic to have the depth range from 1 to 1000000... and so it works just fine now.

Cas http://www.opengl.org/discussion_boards/ubb/smile.gif