thanks a lot one minus solved it. however multiplying with -1 gave me all black.
Black is 0, so 0 * -1 = 0, and your black doesn't invert.
White is 1, so 1 * -1 = -1, and UE4 assumes 0.
You can try adding -1 and converting the output to absolute value.
0 + -1 = -1 (abs = 1)
1 + -1 = 0 (abs = 0)
I was looking for an alternative to OneMinus that I could parameterize. Make -1 a parameter value, and if you want to disable the inversion, you could change it to 0 at runtime.
I'm usually too simple minded to think of using absolute value, I would just do
X * -1 + 1
or if it's greyscale plug it into the alpha of a lerp with the default 1 and 0 values flipped, that's a real easy inversion that doesn't involve minus one.
Replies
thanks a lot one minus solved it. however multiplying with -1 gave me all black.
Black is 0, so 0 * -1 = 0, and your black doesn't invert.
White is 1, so 1 * -1 = -1, and UE4 assumes 0.
You can try adding -1 and converting the output to absolute value.
0 + -1 = -1 (abs = 1)
1 + -1 = 0 (abs = 0)
I was looking for an alternative to OneMinus that I could parameterize. Make -1 a parameter value, and if you want to disable the inversion, you could change it to 0 at runtime.
I'm usually too simple minded to think of using absolute value, I would just do
X * -1 + 1
or if it's greyscale plug it into the alpha of a lerp with the default 1 and 0 values flipped, that's a real easy inversion that doesn't involve minus one.