Can someone with shader knowledge take a look at this and tell me why it doesnt work on the iPhone. It was taken from the Wiki, and works in the editor using ES 2.0 graphics emulation, but no other emulation. When I build it to the iPhone device it doesn't run either.
I'm not sure what to look for or tweak in order to begin making it work on lower emulation settings or if it can be done at all. Thanks. You can also find the original code here, it doesnt seem to format correctly below...
Shader "FX/Hyperbolic Static" {
Properties { _Color ("Color Tint", Color) = (1,1,1,1) _Rate ("Oscillation Rate", Range (1, 500)) = 300 }
SubShader {
ZWrite Off
Tags { "Queue" = "Transparent" }
Blend One One
Pass {
CGPROGRAM
pragma vertex vert
pragma fragment frag
pragma fragmentoption ARB_fog_exp2
include "UnityCG.cginc"
float4 _Color; float _Rate;
struct v2f { float4 pos : SV_POSITION; float4 texcoord : TEXCOORD0; };
v2f vert (appdata_base v) { v2f o; o.pos = mul (UNITY_MATRIX_MVP, v.vertex); o.texcoord = v.texcoord; return o; }
half4 frag (v2f i) : COLOR { float3 color; float m; m = _Time[0] * _Rate + ((i.texcoord[0]+i.texcoord1) * 5000000 * _Color.a * _Color.a); m = sin(m) * 0.5; color = float3(m * _Color.r, m * _Color.g, m * _Color.b); return half4( color, 1 ); } ENDCG
}
} Fallback "Transparent/Diffuse" }