I have this shader that works perfectly in editor but when built for android, it just turns pink. I get two GLSL link errors in logcat telling me it cannot find locations for rims and tiles. Is there a hardware feature that is required for this to work? My test device has a PowerVR GE8100 gpu which seems to support opengl es 3.2. If anyone has the answer to this or the time to actually test this thing on their device, any one of those would be greatly appreciated. Also, it seems to be pointing to the second line here in GLES 3.0 vertex shader, if this helps understand the issue better. #if UNITY_SUPPORTS_UNIFORM_LOCATION #define UNITY_LOCATION(x) layout(location = x) Code (CSharp): 'unity_ObjectToWorld' Shader "Game/MeshFill" { Properties { _MainTex ("Texture", 2D) = "white" {} _BGColor ("BG Color", Color) = (.5,.5,.5,1) _Scale ("Scale", float) = 1.0 _FillAmount ("Fill Amount", Range(-1,1)) = 0.0 _ToonColor ("Toon Color", Color) = (.5,.5,.5,1) [NoScaleOffset]_ToonShade ("Cubemap", CUBE) = "" { } _Outline ("_Outline", Range(0,0.1)) = 0 _OutlineColor ("Color", Color) = (1, 1, 1, 1) [Toggle(USE_UV)] _useUV ("Use UV index", Float) = 0 } SubShader { Pass { Stencil { Ref 1 Comp always Pass replace } Tags {"RenderQueue" = "Opaque" "RenderType" = "Opaque" "Queue" = "Geometry"} // Zwrite On Lighting off CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma shader_feature USE_UV #include "UnityCG.cginc" float LevelSize; float tiles[1023]; float rims[1023]; struct appdata { float4 vertex : POSITION; float2 uv : TEXCOORD0; float3 normal : NORMAL; }; struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; float fillEdge : TEXCOORD1; float3 cubenormal : TEXCOORD2; float2 fill : TEXCOORD3; }; sampler2D _MainTex; float4 _MainTex_ST; float _FillAmount; float4 _TopColor; samplerCUBE _ToonShade; float4 _ToonColor; float4 _BGColor; float _Scale; v2f vert(appdata_full v) { v2f o; float3 worldPos = mul(unity_ObjectToWorld, v.vertex); #ifndef USE_UV o.fill.x = tiles[floor(worldPos.x) * LevelSize + floor(worldPos.z)]; o.fill.y = rims[floor(worldPos.x) * LevelSize + floor(worldPos.z)]; #else o.fill.x = tiles[v.texcoord3.x * LevelSize + v.texcoord3.y]; o.fill.y = rims[floor(worldPos.x) * LevelSize + floor(worldPos.z)]; #endif o.vertex = UnityObjectToClipPos(v.vertex); o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); o.fillEdge = v.vertex.y + -_Scale * _FillAmount; o.cubenormal = UnityObjectToViewPos(float4(v.normal,0)); return o; } fixed4 frag(v2f i) : SV_Target { fixed4 gradient = tex2D(_MainTex, i.uv); fixed4 cube = texCUBE(_ToonShade, i.cubenormal.xyz) * _ToonColor; float4 result = i.fill.x; float4 resultColor = (cube + gradient); float4 color = lerp(lerp(Luminance(resultColor), resultColor, 0), result * resultColor, result) * (1, i.fill.y, 1-i.fill.y, 1); //color.a = lerp(_ToonColor.w, 1, i.fill); return color; } ENDCG } Pass { Stencil { Ref 1 Comp notEqual Pass keep } Tags {"RenderQueue"="AlphaTest" "RenderType"="TransparentCutout" "Queue"="Geometry"} Cull Front Ztest always ColorMask RGB Lighting off Offset 10, 0 CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma shader_feature USE_UV #include "UnityCG.cginc" float LevelSize; float tiles[1024]; float rims[1024]; struct v2f { float4 pos : SV_POSITION; }; float _Outline; float4 _OutlineColor; float4 vert(appdata_full v) : SV_POSITION { v2f o; o.pos = UnityObjectToClipPos(v.vertex); float3 normal = UnityObjectToViewPos(v.normal); normal.x *= UNITY_MATRIX_P[0][0]; normal.y *= UNITY_MATRIX_P[1][1]; float3 worldPos = mul(unity_ObjectToWorld, v.vertex); #ifndef USE_UV o.pos.xy += normal.xy * _Outline * (1 - rims[floor(worldPos.x) * LevelSize + floor(worldPos.z)]); #else o.pos.xy += normal.xy * _Outline * (1 - rims[v.texcoord3.x * LevelSize + v.texcoord3.y]); #endif return o.pos; } half4 frag(v2f i, fixed facing : VFACE) : SV_Target { return _OutlineColor; } ENDCG } } }