Basic Shader Processes
From C4 Engine Wiki
|
Process |
Description |
|
Constant Scalar |
Inputs: None Output: Scalar Outputs a constant scalar value that is set in the Process Info window. A parameter slot may be specified in the Process Info window. If the parameter slot is set to “Constant” (the default), then the output of this process can never be changed while rendering. However, if one of the eight numbered parameter slots is selected, then it is possible to change the value output by this process without actually modifying the shader. For instance, the Set Shader Parameter script methods can be used to change the output value of this process, effectively making it a variable parameter of the shader. |
|
Constant Vector |
Inputs: None Output: 4D vector Outputs a constant vector value that is set in the Process Info window. See the note about parameter slots under the Constant Scalar process. |
|
Constant Color |
Inputs: None Output: RGBA color Outputs a constant color value that is set in the Process Info window. See the note about parameter slots under the Constant Scalar process. |
|
Shader Time |
Inputs: None Output: Scalar Outputs a scalar value in the range [0,1) representing the current shader time. The shader time runs from 0 to 1 over a period of 120 seconds and then repeats by wrapping back to 0. |
|
Shader Detail Parameter |
Inputs: None Output: Scalar Outputs a scalar value in the range [0,1] representing the shader detail parameter. This value moves from 1.0 to 0.0 as the switch from the high-detail shader to the low-detail shader approaches. It is always 0.0 in the low-detail shader. The shader detail parameter can be used to smoothly fade out certain components of a shader before the switch to low detail occurs. |
|
Texture Map |
Inputs: 2D or 3D vector TEXC (required) Output: RGBA color Samples a texture map using the input texture coordinates TEXC. The texture map is specified in the Process Info window. The size of the input TEXC is determined by the type of the texture map. The input is a 2D vector for 2D and RECT textures, and the size is a 3D vector for 3D and CUBE textures. Note that this process should not be used for normal maps. Use the Normal Map process instead. |
|
Normal Map |
Inputs: 2D vector TEXC (required) Output: 3D vector Samples a normal map using the input texture coordinates TEXC. The normal map is specified in the Process Info window. |
|
Terrain Texture |
Inputs: None Output: RGBA color Samples a terrain texture palette. The texture map is specified in the Process Info window. Note that this process should not be used for terrain normal maps. Use the Terrain Normal process instead. |
|
Terrain Normal 1, 2, 3 |
Inputs: None Output: 3D vector Samples a terrain normal palette. The normal map is specified in the Process Info window. If one of these three processes exists, then all three should exist and should use the same normal map. Their outputs should be sent to a Terrain Diffuse Reflection and/or Terrain Specular Reflection process. |
|
Impostor Texture |
Inputs: None Output: RGBA color Samples an impostor texture map. The texture map is specified in the Process Info window. Note that this process should not be used for impostor normal maps. Use the Impostor Normal process instead. |
|
Impostor Normal |
Inputs: None Output: 3D vector Samples an impostor normal map. The normal map is specified in the Process Info window. |
|
Merge 2D |
Inputs: Scalar x (required), Scalar y (required) Output: 2D vector Combines the two scalar inputs x and y into a single 2D vector output. |
|
Merge 3D |
Inputs: Scalar x (required), Scalar y (required), Scalar z (required) Output: 3D vector Combines the three scalar inputs x, y, and z into a single 3D vector output. |
|
Merge 4D |
Inputs: Scalar x (required), Scalar y (required), Scalar z (required), Scalar w (required) Output: 4D vector Combines the four scalar inputs x, y, z, and w into a single 4D vector output. |














