Power node ignores Y, Z components of float 3 in Exp pin if base is Float 1

Power ignores Y, Z components of float 3 in Exp pin if base is Float 1. Is it intended behaviour or is it a bug?


Providing float 3 to Base of Power solves the issue:

1 Like

Normally, you put the color value (vector) into the base and set the exponent to a float value. Then this exponent is applied to each of the vector components, e.g. making higher contrast etc…
Maybe you just mixed up Base and Exp, but I’m not sure, what you want to achieve exactly. To my knowledge, Exp is always uses as a scalar.
EDIT: here’s a Tutorial by Mathew Wadstein about the power node.

EDIT2: I was curious, doing some tests. It looks like passing in an exponent as vector is possible and has an influence when changing y and z indeed. So these definitely do not just get dropped but instead do a power calculation per component.

You made a very interesting observation. Simply having a float as base shows the same behaviour for me as you observe. While this produces a vector color output, the y and z values of the Exp get ignored. Looks like the shader compiler first checks the dimension of the Base input node you connect and then applies the same dimension to the Exp instead of using the dimension of the output or the expanded input.

So regardless if this is a bug nor not (and it looks a little but like it is), at least you have found a cool workaround. At least I even was not aware of using Exp with vector input at all :slight_smile:

2 Likes