WARNING: Shader Unsupported: 'Custom/Smear' - All passes removed

Unity Version 5.4.0f3 - Can someone help me get this shader working on IOS9+? Thanks to the author:HelpfulScripts/SmearEffect at master · cjacobwade/HelpfulScripts · GitHub, the shader works well in the unity editor but it is removed when i try to run it on my iphone6.

// Upgrade NOTE: replaced ‘_Object2World’ with ‘unity_ObjectToWorld’
// Upgrade NOTE: replaced ‘_World2Object’ with ‘unity_WorldToObject’

Shader “Custom/Smear”
{
Properties
{
_Color(“Color”, Color) = (1,1,1,1)
_MainTex(“Albedo (RGB)”, 2D) = “white” {}
_Glossiness(“Smoothness”, Range(0,1)) = 0.5
_Metallic(“Metallic”, Range(0,1)) = 0.0

_Position(“Position”, Vector) = (0, 0, 0, 0)
_PrevPosition(“Prev Position”, Vector) = (0, 0, 0, 0)

_NoiseScale(“Noise Scale”, Float) = 15
_NoiseHeight(“Noise Height”, Float) = 1.3
}

SubShader
{
Tags{ “RenderType” = “Opaque” }
LOD 200

CGPROGRAM
#pragma surface surf Standard vertex:vert
#pragma target 2.0

sampler2D _MainTex;

struct Input
{
float2 uv_MainTex;
};

half _Glossiness;
half _Metallic;
fixed4 _Color;
fixed4 _PrevPosition;
fixed4 _Position;

half _NoiseScale;
half _NoiseHeight;

float hash(float n)
{
return frac(sin(n)*43758.5453);
}

float noise(float3 x)
{
// The noise function returns a value in the range -1.0f → 1.0f

float3 p = floor(x);
float3 f = frac(x);

f = ff(3.0 - 2.0f);
float n = p.x + p.y
57.0 + 113.0*p.z;

return lerp(lerp(lerp(hash(n + 0.0), hash(n + 1.0), f.x),
lerp(hash(n + 57.0), hash(n + 58.0), f.x), f.y),
lerp(lerp(hash(n + 113.0), hash(n + 114.0), f.x),
lerp(hash(n + 170.0), hash(n + 171.0), f.x), f.y), f.z);
}

void vert(inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input, o);
fixed4 worldPos = mul(unity_ObjectToWorld, v.vertex);

fixed3 worldOffset = _Position.xyz - _PrevPosition.xyz; // -5
fixed3 localOffset = worldPos.xyz - _Position.xyz; // -5

// World offset should only be behind swing
float dirDot = dot(normalize(worldOffset), normalize(localOffset));
fixed3 unitVec = fixed3(1, 1, 1) * _NoiseHeight;
worldOffset = clamp(worldOffset, unitVec * -1, unitVec);
worldOffset *= -clamp(dirDot, -1, 0) * lerp(1, 0, step(length(worldOffset), 0));

fixed3 smearOffset = -worldOffset.xyz * lerp(1, noise(worldPos * _NoiseScale), step(0, _NoiseScale));
worldPos.xyz += smearOffset;
v.vertex = mul(unity_WorldToObject, worldPos);
}

void surf(Input IN, inout SurfaceOutputStandard o)
{
// Albedo comes from a texture tinted by color
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
o.Albedo = c.rgb;

// Metallic and smoothness come from slider variables
o.Metallic = _Metallic;
o.Smoothness = _Glossiness;
o.Alpha = c.a;
}
ENDCG
}

FallBack “Diffuse”
}

2961866–219885–Smear.shader (2.5 KB)
2961866–219886–SmearEffect.cs (731 Bytes)

How about changing the hash to exclude that sine? That should save quite a few instructions in the vertex shader.

float hash(float n)
{
    return frac(n*43758.5453);
}