Gradient BUG - 128 of 255 repeats twice, shifts whole gradient by 1
Posted: 2017-07-29T04:49:35-07:00
So, I wanted to generate gradient texture sampler for shader, did this:
magick -size 256x1 -define gradient:angle=90 gradient:#000000-#00ff00 linear_gradient_green.png
Supposed result should be color from 0 to 255 where pixel X coord equal to color number.
From 0 to 128 everything is correct, 0=0 and 128=128, but things starting to get funny from X=129 which for some reason still has same color 128 as previous pixel, and this end with entire second half of range shifted by 1 pixel and 255=254.
Please, fix this miscalculation of gradient, it may be not very noticeable by eye, but when you use texture for sampling colors in shader and when instead of pure white you got shade of grey, it gets ugly and ruins color calibrations.
magick -size 256x1 -define gradient:angle=90 gradient:#000000-#00ff00 linear_gradient_green.png
Supposed result should be color from 0 to 255 where pixel X coord equal to color number.
From 0 to 128 everything is correct, 0=0 and 128=128, but things starting to get funny from X=129 which for some reason still has same color 128 as previous pixel, and this end with entire second half of range shifted by 1 pixel and 255=254.
Please, fix this miscalculation of gradient, it may be not very noticeable by eye, but when you use texture for sampling colors in shader and when instead of pure white you got shade of grey, it gets ugly and ruins color calibrations.