Ramp precision

I’m not getting a full 0-1 range on a ramp top with only 10 pixels wide. That last pixel is only reading 0.95 value.

I have the ramp set to 32-bit float mono, (although I’ve tried 8 bit and full 32 bit RGBA and it behaves the same)

build 2018.25000 - Windows 10

here is a screenshot and toe.


RampPrecision.toe (3.83 KB)

That is weird

I would just use a chopTO instead
AccurateRampTop.tox (446 Bytes)

Thanks Harvey! That’s exactly what I ended up doing instead!

I was thinking I was crazy until I analyze the values.

I think this is related to how the center of a pixel is offset by 0.5.
If you have two pixels, the first is 0.5, and the second is 1.5. The UVs are
0.5/2 and 1.5/2. Therefore you get 0.25 and 0.75.
If you have ten pixels, the first is 0.5/10 and last is 9.5/10

@david if I read you correctly then I shouldn’t I be able to shift the positions of the in and out on the ramp like this (see picture).

0.5/10
9.5/10

It’s better… the max end is giving a value of 1 but the min is still slightly offset and not quite 0.