Add Scalar takes the Main Input connection and adds it to the Input 2 connection and passes the result to the Output.
![Add Scaler_01.jpg Add Scaler_01.jpg](https://planetside.co.uk/forums/index.php?PHPSESSID=a8fe3980327e6d16ad0dc59870231a59&action=dlattach;topic=26962.0;attach=92292)
Notice that the displacement from the Power Fractals has been stripped away and only the grey scalar value has been used in the output. If you want to add displacements together then the Merge Shader would be the node to use.
If Input 2 is disconnected, the Main Input passes through to the Output, again without the displacement, only the scalar grey value.
![Add Scaler_02.jpg Add Scaler_02.jpg](https://planetside.co.uk/forums/index.php?PHPSESSID=a8fe3980327e6d16ad0dc59870231a59&action=dlattach;topic=26962.0;attach=92294)
If the Main Input is disconnected, nothing passes through.
![Add Scaler_03.jpg Add Scaler_03.jpg](https://planetside.co.uk/forums/index.php?PHPSESSID=a8fe3980327e6d16ad0dc59870231a59&action=dlattach;topic=26962.0;attach=92296)
If you connect two colour sources, the Add Scalar node will take the luminance of the colour channels of each input to create a grey scale map of the inputs brightness and then add them together, ignoring the colour information. The maths being luminance = 0.2125 * r + 0.7152 * g + 0.0724 * b
![Add Scaler_04.jpg Add Scaler_04.jpg](https://planetside.co.uk/forums/index.php?PHPSESSID=a8fe3980327e6d16ad0dc59870231a59&action=dlattach;topic=26962.0;attach=92298)
If you connect vector sources to the inputs, the node will look at the length the vector makes from a zero origin to produce a scalar value. The internal maths to do this is the square_root(x*x + y*y + z*z).
![Add Scaler_05.jpg Add Scaler_05.jpg](https://planetside.co.uk/forums/index.php?PHPSESSID=a8fe3980327e6d16ad0dc59870231a59&action=dlattach;topic=26962.0;attach=92300)
The preview panel can only show values up to 2 (the Preview Panel is set this way to see overlaid graphics), so the pure white areas have values beyond 2 in this example. There is no restriction to the size of the number being affected.
![Add Scaler_06.jpg Add Scaler_06.jpg](https://planetside.co.uk/forums/index.php?PHPSESSID=a8fe3980327e6d16ad0dc59870231a59&action=dlattach;topic=26962.0;attach=92302)
If there's any errors, omissions or questions about the above, please leave a comment below.
Wiki link:
https://planetside.co.uk/wiki/index.php?title=Add_Scalar