shader - What are the semantics in CG programming? -
msdn stated semantic string attached shader input or output conveys information intended use of parameter
unity stated semantics special clause of cg define default input values of fragment/vertex shader
what semantics? why use it? necessary?
basically tells kind of data stored in field - position, normal, texture coordinates et cetera.
it useful describe vertex format in fixed-function pipeline in programmable pipeline semantics described shader, definition in vertex format may have no sense (for example, shader may use texcoord0 normals) yet still required compiler.
Comments
Post a Comment