fix gamma curve, it was all broken!
This commit is contained in:
parent
ccd54d62cd
commit
e315eeb3be
1 changed files with 1 additions and 1 deletions
|
|
@ -18,7 +18,7 @@ constexpr uint32_t command_delay = 0;
|
|||
struct gamma_lut {
|
||||
gamma_lut(double exponent = 2.2) {
|
||||
for (int i = 0; i < 256; i++) {
|
||||
auto v = std::max(i, int(round(1023 * pow(i / 255, exponent))));
|
||||
auto v = std::max(i, int(round(1023 * pow(i / 255., exponent))));
|
||||
lut[i] = v;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue