Hello all. I apologise in advance for such a basic question, but I have found a problem that has left me stumped. I am trying to understand how materials work, so I thought I would make a very simple expression:
The intent here is to take the horizontal value of the uv, subtract 0.5 from it and take the absolute value, so on a simple UV square, the value will start at 0.5 on the left edge, drop to 0 on the middle and rise back to 0.5 on the right edge.
This value then is fed into the alpha field of lerp with A set to 1 (which should work as white (1,1,1) ) and B set to 0 (which should work as black (0,0,0)). Yet the result is a completely white image. If, however, I invert the parameters order, we get:
At first I thought this might simply be an issue of A needing to be lesser than B, but not only would this seem rather weird, the expression works as intended when I use a simple linear u coordinate as the input.
So, I am pretty much at a loss to figure out what the issue here is. Is there a problem with the math expressions I used to put u’s value in range? Am I just not using lerp correctly? My editor version is 4.22.1 and I am doing this on a
Basic Code C++ project with starter content, if it makes a difference.
Thanks for reading this question!