1
0
Fork 0

Smoother Linear Light Table (#6764)

This commit is contained in:
XScorpion2 2019-09-18 20:32:38 -05:00 committed by Drashna Jaelre
parent 46c49ae4e6
commit 095b88bca5
2 changed files with 44 additions and 10 deletions

View file

@ -36,7 +36,11 @@ RGB hsv_to_rgb(HSV hsv) {
h = hsv.h;
s = hsv.s;
#ifdef USE_CIE1931_CURVE
v = pgm_read_byte(&CIE1931_CURVE[hsv.v]);
#else
v = hsv.v;
#endif
region = h * 6 / 255;
remainder = (h * 2 - region * 85) * 3;
@ -79,11 +83,5 @@ RGB hsv_to_rgb(HSV hsv) {
break;
}
#ifdef USE_CIE1931_CURVE
rgb.r = pgm_read_byte(&CIE1931_CURVE[rgb.r]);
rgb.g = pgm_read_byte(&CIE1931_CURVE[rgb.g]);
rgb.b = pgm_read_byte(&CIE1931_CURVE[rgb.b]);
#endif
return rgb;
}