I was developing a C++ implementation of OpenGL for Android and I noticed those weird artifacts that formed between 2 intersecting objects (or triangles) :

Here are the artifacts on Android [Here are the artifacts on Android]

The weird thing is that exactly the same library, running on my windows machine, with exactly the same shaders is not giving the same results (sorry for the bad image resolution) :

No artifacts on windows [No artifacts on windows]

I know about the existence of Z-fighting, but wouldn't that issue persist on Windows as well? I am using a 16 bit depth buffer resolution on Android (which seems to be the maximum here).

Is there something I could be missing or doing wrong?

Thank you!


Well, I was wrong, the maximum depth precision is 24 bits, and setting it this way completely eliminated the problem.

Before, on Android, my EGL configurations were setEGLConfigChooser(8, 8, 8, 0, 16, 0).

With setEGLConfigChooser(8, 8, 8, 0, 24, 0) everything works great.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.