Can an OpenGL ES fragment shader change the depth value of a fragment?
No -- gl_FragDepth
(which is part of the desktop version of GLSL) is not present in OpenGL ES.
You can, however, check for the existence of GL_EXT_frag_depth
. If it's available, then you can write the depth to gl_FragDepthEXT
.
The extension paper gives more details about how to enable the extension and such.