Pixel Depth Offset not working on Android

Did you tried es2 or es3.1?

Pixel depth offset is hi-end feature, so I’m not sure it will work on mobile, especially Android.

Maybe Vulkan render support it?

The title says it all:

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?

Thanks a lot.

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.

I’ve made a pull request here to fix this issue: https://github.com/EpicGames/UnrealEngine/pull/3915