Hidden Shader MotionVectors

Unity 5.4

Hi,
I have been struggling with this shader-not-supported-issue on iOS for a couple of days now and it’s driving me nuts.
Everything works perfectly on Android (different devices tested), but on iOS it is such a hassle to get things done.
Anyway, whenever I run my game in Xcode 7 on my iPad 2 or iPhone 4 (iOS 9 and 7), I get this error:

(Filename: Line: 375) -------- 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; (THIS LINE SEEMS TO BE TRIGGERING THE ISSUE)
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.

I have searched for the hidden shader “Hidden/Internal-MotionVectors” but I can’t seem to find it. also I don’t know which shader is triggering this event. I never used the Internal-MotionVectors.

Thanks for any helpful input.

Just a guess,
From Edit/Project Settings/Graphics can see always included shaders, see if its there

Or if you have 3D objects in scene, disable Motion Vectors from all the mesh renderers…
You can search in hierarchy to see all of them: t:meshrenderer

4 Likes

That helped, thank you mgear!
I should’ve asked earlier… wasted so much time on this.

Hi,
I have been struggling with this shader-not-supported-issue on iOS.
Everything works perfectly on Android. 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)
Plz Help Me.

So, @TrickShinobi you solved the problem finally? I still with the same issue Any help appreciatted
Thanks

Hi @KidintChile
Yes finally Solved Problem Plz Watch Video And Solve Your Bugs

  • Build Phases → Compile Sources → AppStoreDelegate.mm → Add the flag “-fno-objc-arc” And FbUnityInterface.mm

Disabling MotionVectors in the Project settings worked. Thanks mgear.

1 Like