I am working on a Unity shader and I got this error:
Vertex program ‘vertex_main’: unknown input semantics BINORMAL/0
What does it mean and how do I fix it?
I am working on a Unity shader and I got this error:
Vertex program ‘vertex_main’: unknown input semantics BINORMAL/0
What does it mean and how do I fix it?
As the error states, Unity doesn’t recognise the BINORMAL semantic you’re using for the “B” member of the input to the vertex shader. As described here, vertex data must be described by one of the following semantics:
If you want the binormal, you can calculate that in the vertex shader from the NORMAL and TANGENT as:
v2f vert (appdata v) {
...
float3 binormal = cross( v.normal, v.tangent.xyz ) * v.tangent.w;
...
}