Parameter Nodes
In the Shader Designer, parameter nodes represent inputs to the shader that are under the control of the app on a per-draw basis, for example, material properties, directional lights, camera position, and time. Because you can change these parameters with each draw call, you can use the same shader to give an object different appearances.
Parameter node reference
Node |
Details |
Properties |
---|---|---|
Camera World Position |
The position of the camera in world space. Output:
|
None |
Light Direction |
The vector that defines the direction in which light is cast from a light source in world space. You can use this to calculate lighting and specular contributions in world space. Output:
|
None |
Material Ambient |
The diffuse color contribution of the current pixel that is attributed to indirect lighting. The diffuse color of a pixel simulates how lighting interacts with rough surfaces. You can use the Material Ambient parameter to approximate how indirect lighting contributes to the appearance of an object in the real world. Output:
|
|
Material Diffuse |
A color that describes how the current pixel diffuses direct lighting. The diffuse color of a pixel simulates how lighting interacts with rough surfaces. You can use the Material Diffuse parameter to change how the current pixel diffuses direct lighting—that is, directional, point, and spot lights. Output:
|
|
Material Emissive |
The color contribution of the current pixel that is attributed to lighting that it supplies to itself. You can use this to simulate a glowing object; that is, an object that supplies its own light. This light doesn't affect other objects. Output:
|
|
Material Specular |
A color that describes how the current pixel reflects direct lighting. The specular color of a pixel simulates how lighting interacts with smooth, mirror-like surfaces. You can use the Material Specular parameter to change how the current pixel reflects direct lighting—that is, directional, point, and spot lights. Output:
|
|
Material Specular Power |
A scalar value that describes the intensity of specular highlights. The larger the specular power, the more intense and far-reaching the specular highlights become. Output:
|
|
Normalized Time |
The time in seconds, normalized to the range [0, 1], such that when time reaches 1, it resets to 0. You can use this as a parameter in shader calculations, for example, to animate texture coordinates, color values, or other attributes. Output:
|
None |
Time |
The time in seconds. You can use this as a parameter in shader calculations, for example, to animate texture coordinates, color values, or other attributes. Output:
|
None |