Reputation: 1235
msdn stated A semantic is a string attached to a shader input or output that conveys information about the intended use of a parameter
unity stated Semantics is a special clause of Cg to define the default input values of a fragment/vertex Shader
What are the actually semantics? why do we use it? It is necessary?
Upvotes: 0
Views: 574
Reputation: 1334
Basically it tells what kind of data stored in certain field - position, normal, texture coordinates et cetera.
It was useful to describe vertex format in fixed-function pipeline but in programmable pipeline semantics is described by shader, so its definition in vertex format may have no sense (for example, shader may use TEXCOORD0 as normals) yet it still required by compiler.
Upvotes: 1