Unity Shaders

Complex Shaders
Certain shaders cannot be run on e.g. PS3 or Xbox 360, so disabling those outputs may get a shader to compile:

Shader "Test/Complex" { SubShader { Tags { "Queue" = "Transparent" } Pass { Blend SrcAlpha OneMinusSrcAlpha CGPROGRAM


 * 1) include "UnityCG.cginc"


 * 1) pragma only_renderers d3d9 // Skip most platforms
 * 2) pragma target 3.0         // Only Shader Model 3.0


 * 1) pragma vertex vert
 * 2) pragma fragment frag

struct appdata { float4 vertex : POSITION; float4 texcoord : TEXCOORD0; };

struct v2f { float4 pos : SV_POSITION; float4 uv : TEXCOORD0; };

v2f vert (appdata v) { v2f o;   o.pos = mul( UNITY_MATRIX_MVP, v.vertex ); o.uv = float4( v.texcoord.xy, 0, 0 ); return o; }

half4 frag( v2f i ) : COLOR { return half4(1,0,0,1); }

ENDCG } } }