I have created a material using “pixel depth offset”. The material works perfectly in the Editor or in a Standalone Game on PC. But it does not work at all in Mobile Preview nor on my android phone.
Is there anyway to make Pixel Depth Offset work on Android?
I am working on a game for GearVR so I am stuck with ES 2.0 indeed.
I have checked and you are right, the GLSL instruction to write a specific zdepth value to the zbuffer is gl_FragDepth but it does not exist in the ES 2.0 version.
Some people have written an extension to ES 2.0 to add this functionality. The extended instruction is GL_EXT_frag_depth. But i don’t know how to make it available in the UE4 and on android phones.