We are having difficulties with our modified standard shader when running it on Android (OpenGL ES 3). The shader is working fine on other platforms (currently tested and running on D3D9/D3D11/PS4/XboxOne). Our shader code itself is working fine in other GLES 3 based rendering engines as well when using other Unity shaders (for example modified unlit, legacy or custom surface shaders). Inspecting the rendering with a Graphics debugger (Nvidia Tegra) indicates that all inputs (textures, CBs…) are correct. We are inclined to believe the problem is either situated at runtime or during cross compiling to GLSL.
One remarkable point of attention I have found is that changing the standard shader quality (Graphics settings) affects the artifacts. On our shield tablet, both the ‘low’ and ‘high’ setting seems to work just fine while ‘medium’ is wrong. On a Google Pixel phone, changing the quality does not matter (always broken).
Our main questions for you are:
-
Are there besides the BRDF (UNITY_BRDF_PBS) other properties affected by the standard shader quality setting?
-
Is there documentation on how to debug possible shader cross compiling issues? I recognize our shader code inside the generated GLSL but it seems that a whole lot of additional code is generated (of example an int->float conversion seems to add code that looks like detecting/correcting overflow). Is there a way to disable this? Or see the intermediate steps?