Supported HLSL Shader Semantics
 
 
 

The following is a list of 3ds Max supported semantics for DirectX 9 and DirectX 10 hardware rendered materials through the original HLSL parser, identified by the paramId string "0x0000".

Render Semantics

The following are supported render semantics:

Basic Transformations

The following are supported basic transformations (I = Inverse and T = Transpose)

Geometry Semantics

The following are supported geometry based semantics:

Lighting Semantics

The following lighting based semantics are used to populate the light drop downs with the correct style of light.

The following is an example of using lighting based semantics

// light direction (view space)
float3 lightDir : Direction <  
  stringUIName = "Light Direction";
  stringObject = "TargetLight";
  intRefID = 0;
> = {-0.577, -0.577, 0.577};
 
//diffuse setting controlled by the light if available
float4 k_d : LightColor <
  stringUIName = "Diffuse";
  intLightRef = 0;
> = float4( 1.0f, 1.0f, 1.0f, 1.0f );    

Mapping Channel Semantics

3ds max has the concept of mapping channels. The TEXCOORD semantic allows the developer to define which channel is provided on which texture coordinate input for the vertex shader.

The following is an example of its usage

int texcoord0 : TEXCOORD
<
  intTexcoord = 0;
  intMapChannel = 0;
> = 0;

This will provide mapping channel 0 (the vertex color channel) to texcoord0. Currently the actual value of the parameter, in this case texcoord0, is ignored, and the parser only reads the annotation.

Miscellaneous Semantics

The following are non-categorized semantics: