Constant Bias Scale

Hi! Why is this node a mystery to me?

I have an image with gradients from 0 - 255 on the red and the green channel, which I’m trying to convert to meaningful vertex displacement through World Position Offset. 0 means no displacement while 255 means “full” displacement to the positive x and y directions. Right? If I’m using a vector3 parameter instead of an image, displacement in the negative x and y directions is done with negative values on each channel. So I’m thinking, I have to take the 0-255 (or 0 - 1) values from the image i’m trying to use, and convert its scale to -0.5 to 0.5, or -128 to 128 and then use a multiply node to increase the displacement. However I can’t get this to work properly. Should I be able to use the constant bias scale to do this operation, or am I on the wrong track?

constant bias scale just works by
y = (input + bias) * scale

to convert [0,1] (RGBA8 texture values) into a world space offset in the range -128, 128] you would use a bias of -.5 and a scale of 256

ah, thanks! :wink:

It’s basically just and Add node and a Multiply node condensed into one :smiley: