Vertex Shader Input Semantics

An input register is bound to vertex data using vertex shader semantics. Vertex shader input semantics describe the per-vertex data (for example: position, normal, texture coordinates, color, tangent, binormal, etc.) to be loaded from a vertex buffer into a form that can be consumed by the vertex shader.

The input registers consist of 16 four-component floating-point vectors, numbered from 0 - 15.

Vertex shader variables bound to specific input semantics dynamically generate a user interface. You can use the vertex attribute widget to customize the per-vertex attributes that are passed to the effect.

 

If you don't see the vertex attribute widgets in the effects shader’s property editor, check to make sure that you have set a viewport to the Realtime Shaders > OpenGL, DirectX9 or DirectX10 display mode.

The following table shows the supported input semantics for vertex shaders defined in CgFX and DXFX nodes. The [n] notation indicates an optional index.

For information on how to use the effects shaders, see Effects Shaders (.cgfx Files) and Effects Shaders (.fx Files) [Realtime Shaders].

Input

Description

Type

BINORMAL[n]

Binormal.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

The widget is labeled as follows:

IN.VariableName (CgFX)

Binormal (DXFX)

float4

BLENDINDICES[n]

Blend indices for skeletal blending.

Softimage does not supply the data for variables bound to this semantic. It is up to the vertex shader program to calculate the required values and supply them as input.

float4

BLENDWEIGHT[n]

Blending weights for skeletal blending.

Softimage does not supply the data for variables bound to this semantic. It is up to the vertex shader program to calculate the required values and supply them as input.

float4

COLOR[n]

Color.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

The widget is labeled as follows:

IN.VariableName (CgFX)

Vertex_Color (DXFX)

float4

DIFFUSE0

Diffuse color.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

float4

NORMAL[n]

Normal vector.

This semantic is automatically bound by Softimage.

float4

POSITION[n]

Vertex position in object space.

The position variable (bound to the POSITION semantic) is required, as it is used for rasterization. It is the only variable that is required as an input to the vertex program.

This semantic is automatically bound by Softimage.

float4

POSITIONT[n]

Transformed vertex position.

This semantic is automatically bound by Softimage.

float4

PSIZE[n]

Point size.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

float4

SPECULAR0

Specular color.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

float4

TANGENT[n]

Tangent.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

The widget is labeled as follows:

IN.VariableName (CgFX)

Tangent (DXFX)

float4

TESSFACTOR[n]

Tesselation factor.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

float4

TEXCOORD[n]

Texture coordinates.

This semantic generates a vertex attribute widget where you can specify and edit the data you are passing to the vertex shader.

The widget is labeled as follows:

IN.VariableName (CgFX)

Texture_Projection (DXFX)

float4

 



Autodesk Softimage v.7.5