Search Issue Tracker

By Design

Votes

10

Found in

5.4.0b21

Issue ID

804159

Regression

No

[iOS][GLES] Extension 'GL_EXT_frag_depth' is not supported when running on GLES2

Image Effects

-

To Reproduce:

1. Build and run the attached project with 5.4 (tested on b21) on iOS with GLES2 on iOS.
2. Observe that these errors are outputted to the console:

-------- failed compiling:
fragment evaluation shader
WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
ERROR: 0:31: Use of undeclared identifier 'gl_FragDepthEXT'

--

shader ‘Fishlabs/Diffuse’ shader in ‘Assets/Shaders’

This is not reproducible when using the same shader on 5.3:
Version 5.3.4p6 (9eb825cf2ca3)
Mon, 02 May 2016 11:15:14 GMT
Branch: 5.3/patch-release

Reprodcued on:
Version 5.4.0b21 (ebe3d2a59a59)
Wed, 01 Jun 2016 05:42:30 GMT
Branch: 5.4/staging

Comments (18)

  1. kosted

    Dec 07, 2017 13:42

    Same issue with unity 2017.2.0f3

  2. Mourkain

    Jun 20, 2017 09:53

    same issue with iPad 3, iOS 9 Unity 5.6.1f1

  3. comworm

    Jun 16, 2017 02:04

    Same issue in Unity 5.6.1f1.
    iPhone5 (iOS 10.3.2)

  4. KidintChile

    Apr 15, 2017 15:43

    I solved only reducing size of 2d sprites, via overriding graphics for iOS, then it works. :)

  5. Chintan-Kansagara

    Mar 25, 2017 13:15

    Hi,
    I have been struggling with this shader-not-supported-issue on iOS .
    Everything works perfectly on Android (different devices tested), but on iOS it is such a hassle to get things done.

    -------- failed compiling:
    fragment evaluation shader
    WARNING: 0:4: extension 'GL_EXT_frag_depth' is not supported
    ERROR: 0:38: Use of undeclared identifier 'gl_FragDepthEXT'

    Note: Creation of internal variant of shader 'Hidden/Internal-MotionVectors' failed.
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader.
    (lldb)

    Please help with this! Did you find any solution?

  6. artaka

    Mar 02, 2017 18:41

    Unity 5.6.0b9 still has this issue:

    -------- Shader compilation failed
    #version 150
    #extension GL_ARB_explicit_attrib_location : require
    #extension GL_ARB_shader_bit_encoding : enable
    #extension GL_OVR_multiview : require
    #extension GL_OVR_multiview2 : enable
    uniform vec4 _MainTex_ST;
    uniform vec4 _Color;
    layout(std140) uniform UnityPerDraw {
    vec4 hlslcc_mtx4x4unity_ObjectToWorld[4];
    vec4 hlslcc_mtx4x4unity_WorldToObject[4];
    vec4 unity_LODFade;
    vec4 unity_WorldTransformParams;
    };
    layout(std140) uniform UnityStereoGlobals {
    vec4 hlslcc_mtx4x4unity_StereoMatrixP[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixInvV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixVP[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraInvProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoWorldToCamera[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraToWorld[8];
    vec3 unity_StereoWorldSpaceCameraPos[2];
    vec4 unity_StereoScaleOffset[2];
    };
    layout(num_views = 2) in;
    in vec4 in_POSITION0;
    in vec4 in_COLOR0;
    in vec2 in_TEXCOORD0;
    out vec4 vs_COLOR0;
    out vec2 vs_TEXCOORD0;
    vec4 u_xlat0;
    int u_xlati1;
    vec4 u_xlat2;
    void main()
    {
    u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1];
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0;
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0;
    u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3];
    u_xlati1 = int(gl_ViewID_OVR) << 2;
    u_xlat2 = u_xlat0.yyyy * hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 1];
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1] * u_xlat0.xxxx + u_xlat2;
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 2] * u_xlat0.zzzz + u_xlat2;
    gl_Position = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 3] * u_xlat0.wwww + u_xlat2;
    vs_COLOR0 = in_COLOR0 * _Color;
    vs_TEXCOORD0.xy = in_TEXCOORD0.xy * _MainTex_ST.xy + _MainTex_ST.zw;
    return;
    }
    -------- failed compiling:
    vertex shader
    GLSL compilation failed:
    ERROR: 0:4: '' : extension 'GL_OVR_multiview' is not supported
    WARNING: 0:5: extension 'GL_OVR_multiview2' is not supported


    (Filename: /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 690)

    Note: Creation of internal variant of shader 'GUI/Text Shader' failed.
    -------- Shader compilation failed
    #version 150
    #extension GL_ARB_explicit_attrib_location : require
    #extension GL_ARB_shader_bit_encoding : enable
    #extension GL_OVR_multiview : require
    #extension GL_OVR_multiview2 : enable
    layout(std140) uniform UnityPerDraw {
    vec4 hlslcc_mtx4x4unity_ObjectToWorld[4];
    vec4 hlslcc_mtx4x4unity_WorldToObject[4];
    vec4 unity_LODFade;
    vec4 unity_WorldTransformParams;
    };
    layout(std140) uniform UnityStereoGlobals {
    vec4 hlslcc_mtx4x4unity_StereoMatrixP[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixInvV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixVP[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraInvProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoWorldToCamera[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraToWorld[8];
    vec3 unity_StereoWorldSpaceCameraPos[2];
    vec4 unity_StereoScaleOffset[2];
    };
    layout(num_views = 2) in;
    in vec4 in_POSITION0;
    vec4 u_xlat0;
    int u_xlati1;
    vec4 u_xlat2;
    void main()
    {
    u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1];
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0;
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0;
    u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3];
    u_xlati1 = int(gl_ViewID_OVR) << 2;
    u_xlat2 = u_xlat0.yyyy * hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 1];
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1] * u_xlat0.xxxx + u_xlat2;
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 2] * u_xlat0.zzzz + u_xlat2;
    gl_Position = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 3] * u_xlat0.wwww + u_xlat2;
    return;
    }
    -------- failed compiling:
    vertex shader
    GLSL compilation failed:
    ERROR: 0:4: '' : extension 'GL_OVR_multiview' is not supported
    WARNING: 0:5: extension 'GL_OVR_multiview2' is not supported


    (Filename: /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 690)

    Note: Creation of internal variant of shader 'Hidden/InternalErrorShader' failed.
    -------- Shader compilation failed
    #version 150
    #extension GL_ARB_explicit_attrib_location : require
    #extension GL_ARB_shader_bit_encoding : enable
    #extension GL_OVR_multiview : require
    #extension GL_OVR_multiview2 : enable
    layout(std140) uniform UnityPerDraw {
    vec4 hlslcc_mtx4x4unity_ObjectToWorld[4];
    vec4 hlslcc_mtx4x4unity_WorldToObject[4];
    vec4 unity_LODFade;
    vec4 unity_WorldTransformParams;
    };
    layout(std140) uniform UnityStereoGlobals {
    vec4 hlslcc_mtx4x4unity_StereoMatrixP[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixInvV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixVP[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraInvProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoWorldToCamera[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraToWorld[8];
    vec3 unity_StereoWorldSpaceCameraPos[2];
    vec4 unity_StereoScaleOffset[2];
    };
    layout(num_views = 2) in;
    in vec4 in_POSITION0;
    in vec4 in_COLOR0;
    out vec4 vs_COLOR0;
    vec4 u_xlat0;
    int u_xlati1;
    vec4 u_xlat2;
    void main()
    {
    u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1];
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0;
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0;
    u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3];
    u_xlati1 = int(gl_ViewID_OVR) << 2;
    u_xlat2 = u_xlat0.yyyy * hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 1];
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1] * u_xlat0.xxxx + u_xlat2;
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 2] * u_xlat0.zzzz + u_xlat2;
    gl_Position = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 3] * u_xlat0.wwww + u_xlat2;
    vs_COLOR0 = in_COLOR0;
    return;
    }
    -------- failed compiling:
    vertex shader
    GLSL compilation failed:
    ERROR: 0:4: '' : extension 'GL_OVR_multiview' is not supported
    WARNING: 0:5: extension 'GL_OVR_multiview2' is not supported


    (Filename: /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 690)

    Note: Creation of internal variant of shader 'Hidden/InternalClear' failed.
    -------- Shader compilation failed
    #version 150
    #extension GL_ARB_explicit_attrib_location : require
    #extension GL_ARB_shader_bit_encoding : enable
    #extension GL_OVR_multiview : require
    #extension GL_OVR_multiview2 : enable
    layout(std140) uniform UnityPerDraw {
    vec4 hlslcc_mtx4x4unity_ObjectToWorld[4];
    vec4 hlslcc_mtx4x4unity_WorldToObject[4];
    vec4 unity_LODFade;
    vec4 unity_WorldTransformParams;
    };
    layout(std140) uniform UnityStereoGlobals {
    vec4 hlslcc_mtx4x4unity_StereoMatrixP[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixInvV[8];
    vec4 hlslcc_mtx4x4unity_StereoMatrixVP[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraInvProjection[8];
    vec4 hlslcc_mtx4x4unity_StereoWorldToCamera[8];
    vec4 hlslcc_mtx4x4unity_StereoCameraToWorld[8];
    vec3 unity_StereoWorldSpaceCameraPos[2];
    vec4 unity_StereoScaleOffset[2];
    };
    layout(num_views = 2) in;
    in vec4 in_POSITION0;
    in vec4 in_COLOR0;
    out vec4 vs_COLOR0;
    vec4 u_xlat0;
    int u_xlati1;
    vec4 u_xlat2;
    void main()
    {
    u_xlat0 = in_POSITION0.yyyy * hlslcc_mtx4x4unity_ObjectToWorld[1];
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[0] * in_POSITION0.xxxx + u_xlat0;
    u_xlat0 = hlslcc_mtx4x4unity_ObjectToWorld[2] * in_POSITION0.zzzz + u_xlat0;
    u_xlat0 = u_xlat0 + hlslcc_mtx4x4unity_ObjectToWorld[3];
    u_xlati1 = int(gl_ViewID_OVR) << 2;
    u_xlat2 = u_xlat0.yyyy * hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 1];
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1] * u_xlat0.xxxx + u_xlat2;
    u_xlat2 = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 2] * u_xlat0.zzzz + u_xlat2;
    gl_Position = hlslcc_mtx4x4unity_StereoMatrixVP[u_xlati1 + 3] * u_xlat0.wwww + u_xlat2;
    vs_COLOR0 = in_COLOR0;
    return;
    }
    -------- failed compiling:
    vertex shader
    GLSL compilation failed:
    ERROR: 0:4: '' : extension 'GL_OVR_multiview' is not supported
    WARNING: 0:5: extension 'GL_OVR_multiview2' is not supported


    (Filename: /Users/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/ApiGLES.cpp Line: 690)

    Note: Creation of internal variant of shader 'Hidden/InternalClear' failed.

  7. dothem

    Jan 24, 2017 21:36

    Having same issue, any fixes on this?

  8. Guliz

    Jan 13, 2017 16:18

    Is this still a bug with 5.5? Does it work if i import the 5.3 shader into 5.4? I really can't downgrade my project

  9. arc0de

    Dec 21, 2016 17:36

    Please help with this! Did you find any solution?

    I have tested with many devices and versions. This is the result:

    iPhone 4S 8.2.0 - Error 'gl_FragDepthEXT' / Doesn't work
    iPhone 4S 9.3.5 - Error 'gl_FragDepthEXT' / Doesn't work
    iPhone 5 10.0.2 - Works perfectly
    iPad 2 9.3.4 - Works perfectly
    iPad Air 2 10.0.2 - Works perfectly

  10. Zorkman

    Nov 28, 2016 09:47

    I've got the same problem but with 'Hidden/Internal-MotionVectors'...

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.