The Pow Node

This node element is used to output an input value (x) raised to the nth power (where n is the (y) input value), where the input value and/or the power to raise it by may be floats or vectors. When specifying values, you can add them directly to the node input boxes, you can retrieve them from the Node Inputs, or you can add them through the Inspector window:
The Inspector Window Inputs For The Pow Node



Node Inputs

This node accepts the following the inputs:


  • X
    The first input, which is the value to get the power of. Can be a scalar (float) or a vector.


  • Y
    The second input, which is factor to use for the power. Can be a scalar (float) or a vector.


Note that when using this element you may use floats or vectors for either input parameter. If you supply a float and a vector - in either order for the value or the power - then the float will be treated as if it was the same type as the supplied vector, eg:

pow(1.0, vec2(2.0, 3.0))

would be treated as

pow(vec2(1.0, 1.0), vec2(2.0, 3.0))

Also note that if you are using two vectors for the inputs, then they both must be the same type. You cannot, for example, use a vec2 as the value and then a vec3 as the power.



Node Output

The node will output either a scalar (float) value or a vector, depending on the inputs that were used.