Shader "Custom/VFShader"
{
SubShader
{
pass {
CGPROGRAM
#pragma exclude_renderers gles
#pragma vertex vert
#pragma fragment frag
#define MACROFL FL4(fl4.ab,fl3.zy);
typedef float4 FL4;
void vert(in float2 objPos:POSITION,out float4 pos:POSITION,out float4 col:COLOR)
{
pos = float4(objPos,0,1);
col = pos;
}
void frag(inout float4 col:COLOR0)
{
fixed r = 1;
fixed g = 0;
fixed b = 0;
fixed a = 1;
col = fixed4(r, g, b, a);
bool bl = false;
col = bl ? col : fixed4(0, 1, 0, 1);
float2 fl2 = float2(1, 0);
float3 fl3 = float3(1, 0, 1);
float4 fl4 = float4(1, 1, 0, 1);
float4 fl = MACROFL
col = fl;
float2x4 M2x4 = { {0,0,1,1},{0,1,0,1} };
col = M2x4[0];
float arr[4] = { 1,0.5,0.5,1 };
col = float4(arr[0], arr[1], arr[2], arr[3]);
}
ENDCG
}
}
}