Result | The main output register for the diffuse (RGB) and alpha values (output only). If not written to, it defaults to the value of the Color input register. |
Metallic | Optional register for metallic property (output only). It is a one-component register (only the first channel (red) is used). It defaults to zero. When the metallic register is used, the specular register cannot be used.. |
Smoothness | Optional register for reflection smoothness (output only). It is a one-component register (only the first channel (red) is used. It defaults to the glossiness setting in the basic tab. |
Roughness | Optional register for reflection roughness (output only). It is a one-component register (only the first channel (red) is used. It defaults to the 1 - glossiness setting in the basic tab. The roughness is 1-smoothness. When roughness is used, smoothness cannot be used and vice versa. |
Specular | Optional register for specular mask (input and output). It is a three-component register. It can be read and written, and it defaults to the specular color from the material or Basic tab. The RGB components of Specular will be multiplied with the specular components of lighting computations to create the final specular color. It will be ignored when RGBGen is not a lighting mode. Assigning a value to the A component will be ignored. Reading from the A component will return an undefined value. When the specular register is used, the metallic register cannot be used at the same time |
Ambient | Optional register for ambient mask (output only). It is a one-component (only the first channel (red) is used) register. When not used, it defaults to 1. The R component of Ambient will be multiplied with the ambient components of lighting computations to create the final ambient color. It will be ignored when RGBGen is not a lighting mode. The G,B, and A components assigned to Ambient will be ignored. |
Emission | Optional register for emission color (output only). When not used, it defaults to {0,0,0,0}. The RGB components of Emission will be added to the color from Result after diffuse and specular lighting was applied. The alpha component of Emission will be ignored. |
Color | Input of the RGBGen and AlphaGen Color Units (input only). When RGBGen is one of the lighting modes, the RGB components of Color is identical with the color from the material or Basic tab. |
Tmp0 | Temporary Register 0 (Input/Output) |
Tmp1 | Temporary Register 1 (Input/Output) |
Tmp2 | Temporary Register 2 (Input/Output) |
Tmp3 | Temporary Register 3 (Input/Output) |
Tex0 | Texel of Texture in Unit 0 (Input only) |
Tex1 | Texel of Texture in Unit 1 (Input only) |
Tex2 | Texel of Texture in Unit 2 (Input only) |
Tex3 | Texel of Texture in Unit 3 (Input only) |
Entity0 | Entity Register 0 (Input only), can be set by NL2SCO user colors or scripts. |
Entity1 | Entity Register 1 (Input only), can be set by NL2SCO user colors or scripts. |
Entity2 | Entity Register 2 (Input only), can be set by NL2SCO user colors or scripts. |
Entity3 | Entity Register 3 (Input only), can be set by NL2SCO user colors or scripts. |
Entity4 | Entity Register 4 (Input only), can be set by NL2SCO user colors or scripts. |
Entity5 | Entity Register 5 (Input only), can be set by NL2SCO user colors or scripts. |
Entity6 | Entity Register 6 (Input only), can be set by NL2SCO user colors or scripts. |
Entity7 | Entity Register 7 (Input only), can be set by NL2SCO user colors or scripts. |
Saturate( Val ) | Clamps values to 0...1 |
Add (Val1, Val2) | Addition. Pseudo Code: Val1 + Val2 |
Sub (Val1, Val2) | Subtraction. Pseudo Code: Val1 - Val2 |
Mul (Val1, Val2) | Multiply. Pseudo Code: Val1 * Val2 |
Mad (Val1, Val2, Val3) | Multiply and Add. Pseudo Code:Val1 * Val2 + Val3 |
Lerp (Val1, Val2, Val3) | Interpolate between Val2 and Val3. Pseudo Code: Val1 * Val2 + (1 - Val1) * Val3 |
Dp3 (Val1, Val2) | Dot Product using the first 3 components (rgb); result will be replicated to all 4 channels. Pseudo Code: Val1[0] * Val2[0] + Val1[1] * Val2[1] + Val1[2] * Val2[2] |
Rsqrt( Val ) | Compute the reciprocal squareroot of Val. Val needs to have a single component swizzle (.r, .g, .b, .a). The result will be replicated to all 4 channels. Pseudo Code: 1/sqrt(Val[n]); where n = 0,1,2,3 depending on swizzle. Together with the dp3 function, the Rsqrt function can be used for normalizing vectors. See examples below. WARNING: Results for zero and negative input values are undefined and those input values should be avoided. Behaviour for those input values is graphics card and API (DirectX) version dependend. |
InputRegister.r | The first component (Red channel) will be replicated to all channels, for example say the temporary register tmp0 represents: {0.4, 0.3, 0.7, 2.0}. tmp0.r would then represent: {0.4, 0.4, 0.4, 0.4} |
InputRegister.g | The second component (Green channel) will be replicated to all channels, for example say the temporary register tmp0 represents: {0.4, 0.3, 0.7, 2.0}. tmp0.g would then represent: {0.3, 0.3, 0.3, 0.3} |
InputRegister.b | The third component (Blue channel) will be replicated to all channels, for example say the temporary register tmp0 represents: {0.4, 0.3, 0.7, 2.0}. tmp0.b would then represent: {0.7, 0.7, 0.7, 0.7} |
InputRegister.a | The fourth component (Alpha channel) will be replicated to all channels, for example say the temporary register tmp0 represents: {0.4, 0.3, 0.7, 2.0}. tmp0.a would then represent: {2.0, 2.0, 2.0, 2.0} |