I am unable to get CImg's color-interpolated 2D triangle to work as expected. To add to the confusion, it behaves differently on my system version of CImg (cimg_version 245) to the latest in Github (cimg_version 300).
If i draw a simple filled triangle, everything works as expected. If i specify a colour for each vertex, there is a difference depending what CImg version i use:
cimg_version 245: Interpolation works to some extent but colour channels are clamped to 255 for values greater than 0. You can see this by comparing the center and right triangles in the image titled "CImg version: 245". The center image fades from {0, 0, 0} to {255, 255, 255} whereas the right image goes from {100, 100, 100} to {255, 255, 255}.
cimg_version 300: In this version, i was unable to get any interpolation to work.
So, am i missing a setting to enable interpolation or should i file a bug report?
This is a copy of an issue I've read here : https://stackoverflow.com/questions/69762090/cimg-problem-with-color-interpolated-2d-triangle/69765885#69765885
I feel like i'm missing something obvious here.
I am unable to get CImg's color-interpolated 2D triangle to work as expected. To add to the confusion, it behaves differently on my system version of CImg (cimg_version 245) to the latest in Github (cimg_version 300).
If i draw a simple filled triangle, everything works as expected. If i specify a colour for each vertex, there is a difference depending what CImg version i use:
cimg_version 245: Interpolation works to some extent but colour channels are clamped to 255 for values greater than 0. You can see this by comparing the center and right triangles in the image titled "CImg version: 245". The center image fades from {0, 0, 0} to {255, 255, 255} whereas the right image goes from {100, 100, 100} to {255, 255, 255}.
cimg_version 300: In this version, i was unable to get any interpolation to work.
So, am i missing a setting to enable interpolation or should i file a bug report?
CImg version: 245 CImg version: 300
[EDIT] Forgot to include what i'm running on: