Game Development Reference
In-Depth Information
The supported vertex shader input usages are:
POSITION[n] —Position
BLENDWEIGHTS[n] —Blend weights
BLENDINDICES[n] —Blend indices
NORMAL[n] —Normal vector
PSIZE[n] —Vertex point size
DIFFUSE[n] —Diffuse color
SPECULAR[n] —Specular color
TEXCOORD[n] —Texture coordinates
TANGENT[n] —Tangent vector
BINORMAL[n] —Binormal vector
TESSFACTOR[n] —Tessellation factor
Where n is an optional integer in the range [0, 15].
Note: Again, a few of these usage types are not covered in this
topic, such as BLENDWEIGHTS , TANGENT , BINORMAL , BLENDINDICES ,
and TESSFACTOR .
In addition, for the output structure, we must specify what each mem-
ber is to be used for. For example, should the data member be treated
as a position vector, color, texture coordinate, etc.? The graphics card
has no idea, unless you explicitly tell it. This is also done with the
semantic syntax:
struct VS_OUTPUT
{
vector position : POSITION;
vector diffuse : COLOR0;
vector specular : COLOR1;
};
The supported vertex shader output usages are:
POSITION —Position
PSIZE —Vertex point size
FOG —Fog blend value
COLOR[n] —Vertex color. Observe that multiple vertex colors can
be output, and these colors are blended together to produce the
final color.
TEXCOORD[n] —Vertex texture coordinates. Observe that multiple
texture coordinates can be output.
where n is an optional integer in the interval [0, 15].
Search WWH ::




Custom Search