Removed gamma correction

This commit is contained in:
Andrew Murray 2022-10-10 20:48:18 +11:00
parent 93cafc8809
commit 78d258f24d
3 changed files with 3 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -688,11 +688,6 @@ bc6_clamp(float value) {
}
}
static float
bc6_gamma_correct(float value, float gamma) {
return powf(1.0f - expf(-value), 1.0f / gamma);
}
static void
bc6_lerp(rgba *col, int *e0, int *e1, int s, int sign) {
int r, g, b;
@ -700,9 +695,9 @@ bc6_lerp(rgba *col, int *e0, int *e1, int s, int sign) {
r = (e0[0] * t + e1[0] * s) >> 6;
g = (e0[1] * t + e1[1] * s) >> 6;
b = (e0[2] * t + e1[2] * s) >> 6;
col->r = bc6_clamp(bc6_gamma_correct(bc6_finalize(r, sign), 2.2f));
col->g = bc6_clamp(bc6_gamma_correct(bc6_finalize(g, sign), 2.2f));
col->b = bc6_clamp(bc6_gamma_correct(bc6_finalize(b, sign), 2.2f));
col->r = bc6_clamp(bc6_finalize(r, sign));
col->g = bc6_clamp(bc6_finalize(g, sign));
col->b = bc6_clamp(bc6_finalize(b, sign));
}
static void