| 73 | } |
| 74 | |
| 75 | inline Vec4f srgba_to_linear(const Vec4f c) |
| 76 | { |
| 77 | return Vec4f(srgb_to_linear(c.x), |
| 78 | srgb_to_linear(c.y), |
| 79 | srgb_to_linear(c.z), |
| 80 | max(c.w, 0.f)); // alpha is never gamma-corrected |
| 81 | } |
| 82 | |
| 83 | // TODO implement srgba8_to_linear with a 256 entry LUT |
| 84 |
no test coverage detected