Primitive, surface, and custom shader parameters

Use these shading parameters when the Operation setting is set to Render. Otherwise, they do not appear in the Preview/Output tab. See XGen Output Settings.

You can turn on the following Primitive Shader Parameters and Surface Shader Parameters to write this information into the render file so that they may be used by any shader attached to the primitive.

Primitive Shader Parameters

Specifies which parameters to pass to the shader.

Length

The length of the current primitive.

Width

The width of the current primitive (without taper applied).

T

The tangent of the current primitive at its generation point.

Stray

Flag indicating if the current primitive is considered stray.

Id

Count for the current primitive on the current face.

Descid

Description index for the current primitive.

Ri

A unique integer ID for the current primitive.

Rf

A unique float ID for the current primitive.

Surface Shader Parameters

Specifies which parameters to pass to the shader.

U

The U parameter of the face the current primitive.

V

The V parameter of the face the current primitive.

Faceid

The face ID on the surface for the current primitive.

Geomid

Geometry index for the current primitive.

P

The point on the surface for the current primitive.

Pref

The point on the reference surface for the current primitive.

Pg

The undisplaced point on the surface for the current primitive.

Prefg

The undisplaced point on the reference surface for the current primitive.

N

The normal on the surface for the current primitive.

Nref

The normal on the reference surface for the current primitive.

Ng

The undisplaced normal on the surface for the current primitive.

Nrefg

The undisplaced normal on the reference surface for the current primitive.

D Pdu

dP/du (tangent) on the surface for the current primitive.

D Pduref

dP/du on the reference surface for the current primitive.

D Pdug

The undisplaced dP/du (tangent) on the surface for the current primitive.

D Pdurefg

The undisplaced dP/du on the reference surface for the current primitive.

D Pdv

dP/dv (tangent) on the surface for the current primitive.

D Pdvref

dP/dv on the reference surface for the current primitive.

D Pdvg

The undisplaced dP/dv (tangent) on the surface for the current primitive.

D Pdvrefg

The undisplaced dP/dv on the reference surface for the current primitive.

Geo Name

A constant (string) that holds the name of the underlying geometry.

Custom Shader Parameters

Create a named shader parameter that you can set with a map or expression, and pass to the shader. For example, you can use a custom shader parameter to specify primitive colors at render time.

Custom Shader Parameters

To add a custom shader parameter, type a Name, select a data type from the list, and then click +. The new shader parameter displays under Custom Shader Parameters.

To delete custom shader parameters, type the parameter Name and then click -.