I'm looking for ideas as to what might be causing a rendering artifact I'm seeing in my app. My app renders a terrain using tiles with vertical skirts to cover the gaps between tiles. When I render I get parts of the far terrain overdrawing the nearer terrain (see attachment).
I have tried ordering the tiles from nearest to furthest away with no effect.
I have tried ordering the tiles from furthest to nearest with some improvement.
It appears that the depth test is failing on some parts of a triangle but not others. You can see that the top of the hill to the left is being drawn correctly and some of the bottom, but not the middle.
The parts of the scene that get overdrawn seem to change based on the viewing angle. i.e. I can shift by a degree in one direction and suddenly the overdraw dissappears.
I have checked that GL_LEQUAL is being used and depth test enabled.
I've tried using GL_LESS with no improvement
I've checked the blendfunc
I've checked different depthrange values with no real benefits.
Any ideas what the cause might be?
Are there certain overdraw limits or z buffer shortcuts that may be being applied on certain mobiles that I might need to consider? I'm using a Galaxy S.
I'm currently not passing any vertex or face normals with my geometry. Anyone had any experience of that causing issues with depth testing?
Thanks in advance
MattFranklinMember Since 21 May 2012
Offline Last Active Aug 13 2012 04:52 AM