About shader error shader error in '/CustomVR TransitionEffect' : invalid input semantic 'POSITION' : Legal indices are in [1] invalid ps_3_0 input semantic 'POSITION at line 32 (on d3d9), every brother please help solve, thank you
Shader "CustomVR/TransitionEffect
"{
The Properties
{
_MainTex (" Texture ", 2 d)="white" {}
_radius (" Radius ", the Range (0, 1))=1
_thickness (" ThickNess ", the Range (0, 1))=0.2
}
SubShader
{
//No culling or the depth
Cull Off ZWrite Off ZTest Always
Pass
{
CGPROGRAM
# pragma vertex vert
# pragma fragments frag
# pragma target 3.0
# include "UnityCG. Cginc
"
Struct appdata
{
Float4 vertex: POSITION;
Float2 uv: TEXCOORD0;
};
Struct v2f
{
Float2 uv: TEXCOORD0;
Float4 vertex: SV_POSITION;
};
V2f vert (appdata v)
{
V2f o;
O.v ertex=UnityObjectToClipPos (v.v ertex);
O.u v=v.u v;
The return o;
}
Sampler2D _MainTex;
Fixed _radius;
Fixed _thickness;
Fixed4 postProcess (v2f I, fixed4 col);
Fixed4 frag (v2f I) : SV_Target
{
Fixed4 col=tex2D (_MainTex, i.u v);
Col=postProcess (I, col);
Return col.
}
Fixed4 postProcess (v2f I, fixed4 col)
{
Float screenRadius=0.5 * SQRT (_ScreenParams. X * _ScreenParams. X + _ScreenParams. Y * _ScreenParams y);
Float r0=_radius * (1 + _thickness) - _thickness;
Float r1=_radius * (1 + _thickness);
Float r=SQRT ((i.v ertex. X - _ScreenParams. X * 0.5) * (i.v ertex. X - _ScreenParams. * 0.5 x) +
(i.v ertex. Y - _ScreenParams. Y * 0.5) * (i.v. Ertex y - _ScreenParams. Y * 0.5))/screenRadius;
If (r & gt;=r1)
{
Clip (1);
}
Else if (r & gt; R0)
{
Col. A=(r - r0)/(r1 - r0);
Col. RGB *=(1 - col. A * 2);
}
Return col.
}
ENDCG
}
}
}