Search Issue Tracker

Fixed in 5.4.0

Votes

0

Found in

5.4.0b3

Issue ID

763708

Regression

Yes

iOS: "Shader compilation failed" error in the log

iOS

-

Steps to reproduce:
- Set Graphics API to OpenGLES2 under Player Settings > Other Settings
- Build a project for iOS (with any backend Mono or IL2CPP)
- Run on a device

Result: See an error in the XCode log (full error in the attached file)

-------- Shader compilation failed
#version 100
precision mediump float;
#extension GL_EXT_shader_texture_lod : enable
lowp vec4 impl_low_textureCubeLodEXT(lowp samplerCube sampler, highp vec3 coord, mediump float lod)
{
#if defined(GL_EXT_shader_texture_lod)
return textureCubeLodEXT(sampler, coord, lod);
#else
return textureCube(sampler, coord, lod);
#endif
}
....
-------- failed compiling:
fragment evaluation shader
Note: Creation of internal variant of shader 'Hidden/CubeBlend' failed.
WARNING: Shader Unsupported: 'Hidden/CubeBlend' - Pass '' has no vertex shader

Comments (19)

  1. OA2014

    Jun 05, 2017 00:25

    It's June 2017 and I'm still getting the same error as everyone else on Unity 5.5.3f1 with an iPhone 6S. I have to use diffuse mobile errors to get good performance out of the game.

    Here's the error:

    -------- Shader compilation failed
    #version 100
    #extension GL_EXT_frag_depth : enable
    precision highp float;
    uniform highp vec4 _ProjectionParams;
    uniform highp vec4 _ZBufferParams;
    uniform highp mat4 unity_CameraToWorld;
    uniform highp mat4 _NonJitteredVP;
    uniform highp mat4 _PreviousVP;
    uniform highp sampler2D _CameraDepthTexture;
    varying highp vec2 xlv_TEXCOORD0;
    varying highp vec3 xlv_TEXCOORD1;
    void main ()
    {
    highp vec4 tmpvar_1;
    tmpvar_1 = texture2D (_CameraDepthTexture, xlv_TEXCOORD0);
    mediump vec2 tmpvar_2;
    highp vec4 tmpvar_3;
    tmpvar_3.w = 1.0;
    tmpvar_3.xyz = ((xlv_TEXCOORD1 * (_ProjectionParams.z / xlv_TEXCOORD1.z)) * (1.0/((
    (_ZBufferParams.x * tmpvar_1.x)
    + _ZBufferParams.y))));
    highp vec4 tmpvar_4;
    tmpvar_4 = (unity_CameraToWorld * tmpvar_3);
    highp vec4 tmpvar_5;
    tmpvar_5 = (_PreviousVP * tmpvar_4);
    highp vec4 tmpvar_6;
    tmpvar_6 = (_NonJitteredVP * tmpvar_4);
    highp vec2 tmpvar_7;
    tmpvar_7 = (((tmpvar_5.xy / tmpvar_5.w) + 1.0) / 2.0);

    highp vec2 tmpvar_8;
    tmpvar_8 = (((tmpvar_6.xy / tmpvar_6.w) + 1.0) / 2.0);
    tmpvar_2 = (tmpvar_8 - tmpvar_7);
    mediump vec4 tmpvar_9;
    tmpvar_9.zw = vec2(0.0, 1.0);
    tmpvar_9.xy = tmpvar_2;
    gl_FragDepthEXT = tmpvar_1.x;
    gl_FragData[0] = tmpvar_9;
    }

  2. retry_entry

    Apr 28, 2017 08:30

    THIS IS NOT RESOLVED. GOT THE SAME ERROR!

  3. xrm0

    Apr 20, 2017 21:51

    The error log is:
    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.
    WARNING: Shader Unsupported: 'Hidden/VR/BlitCopyFromTexArray' - Pass '' has no vertex shader
    WARNING: Shader Unsupported: 'Hidden/VR/BlitCopyFromTexArray' - Setting to default shader.

  4. xrm0

    Apr 20, 2017 21:50

    This is happening to me in 5.6.0f1, in iOS and Android.

  5. DM-FullFat

    Feb 07, 2017 10:48

    OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level <OpenGL ES 2.0> ; Context handle 392377776
    Initialize engine version: 5.5.1p1 (d7332d2a7307)
    -------- Shader compilation failed
    #version 100
    #extension GL_EXT_frag_depth : enable
    precision highp float;
    uniform highp vec4 _ProjectionParams;
    uniform highp vec4 _ZBufferParams;
    uniform highp mat4 unity_CameraToWorld;
    uniform highp mat4 _NonJitteredVP;
    uniform highp mat4 _PreviousVP;
    uniform highp sampler2D _CameraDepthTexture;
    varying highp vec2 xlv_TEXCOORD0;
    varying highp vec3 xlv_TEXCOORD1;
    void main ()
    {
    highp vec4 tmpvar_1;
    tmpvar_1 = texture2D (_CameraDepthTexture, xlv_TEXCOORD0);
    mediump vec2 tmpvar_2;
    highp vec4 tmpvar_3;
    tmpvar_3.w = 1.0;
    tmpvar_3.xyz = ((xlv_TEXCOORD1 * (_ProjectionParams.z / xlv_TEXCOORD1.z)) * (1.0/((
    (_ZBufferParams.x * tmpvar_1.x)
    + _ZBufferParams.y))));
    highp vec4 tmpvar_4;
    tmpvar_4 = (unity_CameraToWorld * tmpvar_3);
    highp vec4 tmpvar_5;
    tmpvar_5 = (_PreviousVP * tmpvar_4);
    highp vec4 tmpvar_6;
    tmpvar_6 = (_NonJitteredVP * tmpvar_4);
    highp vec2 tmpvar_7;
    tmpvar_7 = (((tmpvar_5.xy / tmpvar_5.w) + 1.0) / 2.0);
    highp vec2 tmpvar_8;
    tmpvar_8 = (((tmpvar_6.xy / tmpvar_6.w) + 1.0) / 2.0);
    tmpvar_2 = (tmpvar_8 - tmpvar_7);
    mediump vec4 tmpvar_9;
    tmpvar_9.zw = vec2(0.0, 1.0);
    tmpvar_9.xy = tmpvar_2;
    gl_FragDepthEXT = tmpvar_1.x;
    gl_FragData[0] = tmpvar_9;
    }
    -------- 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.

  6. Cambesa

    Dec 12, 2016 09:57

    Still occurs in Unity 5.5.0f3 when building for android, could this cause this glitch? https://pbs.twimg.com/media/Czd5wX2XcAE9Sk-.jpg I was looking through the adb logcat for hints to this glitch and found this issuetracker

  7. jeromeboe

    Nov 29, 2016 12:09

    Still having the issue with 5.4.2f2.

  8. Zorkman

    Nov 28, 2016 09:53

    This is not fixed in 5.4.3f1. I'm getting the same error as everyone else.

  9. Suguma

    Nov 16, 2016 12:36

    Still a problem in 5.4.2f2!!

  10. Christin2015

    Nov 08, 2016 00:18

    Still same problem in Unity 5.4.2f2 , using MacOS El Sierra here.
    Have this problem on

    iPad mini (iOS 9.3.5) and
    iPad Air 2, (iOS 9.3.5)
    iPhone6 , (iOS 10.1.1)

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.