Add Scalar: Difference between revisions
Jump to navigation
Jump to search
m Repointed GUI image to clean version. |
Changed wording of luminance conversion and removed "from the zero origin" when talking about the length of a vector. |
||
| Line 9: | Line 9: | ||
The Add Scalar node adds two scalars together. It wants the incoming data to be scalars, but it will convert colours and vectors to scalars if necessary. | The Add Scalar node adds two scalars together. It wants the incoming data to be scalars, but it will convert colours and vectors to scalars if necessary. | ||
* When the source of the incoming data is colour data, the Add Scalar node converts the data to scalar based on the | * When the source of the incoming data is colour data, the Add Scalar node converts the data to scalar based on the luminance of the colour. The math for this is: 0.2125 * r + 0.7152 *g + 0.0724 * b. | ||
* When the source of the incoming data is vector data, the Add Scalar node converts the data to scalar based on the length of the vector | * When the source of the incoming data is vector data, the Add Scalar node converts the data to scalar based on the length of the vector. The math for this is: square_root(x*x + y*y + z*z). | ||
Revision as of 03:59, 28 January 2022

Overview
The Add family of nodes allow you to add the colour/scalar/vector coming into the Main Input with the colour/scalar/vector coming into Input 2.
The Add Scalar node adds two scalars together. It wants the incoming data to be scalars, but it will convert colours and vectors to scalars if necessary.
- When the source of the incoming data is colour data, the Add Scalar node converts the data to scalar based on the luminance of the colour. The math for this is: 0.2125 * r + 0.7152 *g + 0.0724 * b.
- When the source of the incoming data is vector data, the Add Scalar node converts the data to scalar based on the length of the vector. The math for this is: square_root(x*x + y*y + z*z).
Settings:
- Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Add Scalar nodes in a project.
- Enable: When checked, the node is active and the Main Input value is added with the Input 2 value. When unchecked, only the Main Input value is passed through the node.
- Input 2: The values from the shader or function nodes assigned to this setting are added to the values of the Main Input.
Fun with Add Scalar