Okay, I’m having a bad time with structs…
well the problem is that my vert program is not accepting my custom struct outside “Pass{}”
for example i have these structs:
struct INPUT {
float4 vertex : POSITION;
float3 normal : NORMAL;
float3 texcoord : TEXCOORD0;
float4 tangent : TANGENT;
};
struct OUTPUT {
float4 position : SV_POSITION;
float4 color : COLOR;
};
and this is my vert function:
OUTPUT VertexShader (INPUT input) {
OUTPUT output;
output.position = mul( UNITY_MATRIX_MVP, input.vertex);
output.color.xyz = binormal * 0.5 + 0.5;
output.color.w = 1.0;
output.vertex.xyz += input.normal * _Amount;
return output;
}
And i get this error:
so as i can see it forces me to use UnityCG.cginc’s default struct… but why??? I dont want to use it! I want to use my own structs