Hi all! I am having a problem with the following shader. The compiler keeps telling:
I dont manage to see the mistake. Any help is appreciated
Shader "Custom/OceanShader" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
// Uniform Variables
sampler2D _MainTex;
// Vertex Variables
struct v2f {
float4 vertex : POSITION;
float2 uv0 : TEXCOORD0;
float2 uv1 : TEXCOORD1;
};
// Matrix Operator
float3x3 m3(float4x4 m)
{
float3x3 result;
result[0][0] = m[0][0];
result[0][1] = m[0][1];
result[0][2] = m[0][2];
result[1][0] = m[1][0];
result[1][1] = m[1][1];
result[1][2] = m[1][2];
result[2][0] = m[2][0];
result[2][1] = m[2][1];
result[2][2] = m[2][2];
return result;
}
// Vertex Shader
v2f vert(appdata_full v)
{
// Return value
v2f output;
// Set the texture coordinates
output.uv0 = v.vertex.xy;
output.uv1 = mul (UNITY_MATRIX_MVP, v.vertex);
// Set the position value
output.vertex = mul (UNITY_MATRIX_MVP, v.vertex);
// Return value for the fragment shader
return output;
}
// Fragment Shader
float4 frag(v2f i) : COLOR
{
return float4(0,0,0,1);
}
ENDCG
}
FallBack "Diffuse"
}