FilmLight E-Gamut 2 / T-Log
Primaries are FilmLight's Enhanced Generic Display Primaries 2024; T-Log is a Cineon-derived logarithmic curve, intended for use as a working colour space.
| x | y | |
|---|---|---|
| Red | 0.8300 | 0.3100 |
| Green | 0.1500 | 0.9500 |
| Blue | 0.0650 | -0.0805 |
| White (D65) | 0.3127 | 0.3290 |
Transfer function
| Curve | FilmLight-T-log |
|---|---|
| Black / white point (10-bit code values) | 0 / 1023 |
| Linear 0 → code | 0.0750 |
| 18% grey → code | 0.3966 |
| Linear 1.0 → code | 0.5525 |
Encoding: convertFromLinear
vec4 convertFromLinear(vec4 val, int clip)
{
float w = 128.0;
float g = 16.0;
float o = 0.075;
// Constants
float b = 1.0/(0.7107 + 1.2359*log(w*g));
float gs = g/(1.0 - o);
float C = b/gs;
float a = 1.0 - b*log(w+C);
float y0 = a + b*log(C);
float s = (1.0 - o)/(1.0 - y0);
float A = 1.0 + (a - 1.0)*s;
float B = b*s;
float G = gs*s;
val.r = val.r < 0.0 ? G*val.r + o : log(val.r + C)*B + A;
val.g = val.g < 0.0 ? G*val.g + o : log(val.g + C)*B + A;
val.b = val.b < 0.0 ? G*val.b + o : log(val.b + C)*B + A;
return val;
}Decoding: convertToLinear
vec4 convertToLinear(vec4 val)
{
float w = 128.0;
float g = 16.0;
float o = 0.075;
// Constants
float b = 1.0/(0.7107 + 1.2359*log(w*g));
float gs = g/(1.0 - o);
float C = b/gs;
float a = 1.0 - b*log(w+C);
float y0 = a + b*log(C);
float s = (1.0 - o)/(1.0 - y0);
float A = 1.0 + (a - 1.0)*s;
float B = b*s;
float G = gs*s;
// Clip so output fits half float limit
vec3 P = clamp(val.rgb, -60000.0, 1.86);
P.r = P.r < o ? (P.r-o)/G : exp((P.r -A)/B) - C;
P.g = P.g < o ? (P.g-o)/G : exp((P.g -A)/B) - C;
P.b = P.b < o ? (P.b-o)/G : exp((P.b -A)/B) - C;
return vec4(P, val.a);
}RGB → XYZ matrix
RGB → XYZ [ 0.736477700184 0.130739651087 0.083238575781 ] [ 0.275069984406 0.828017790216 -0.103087774621 ] [ -0.124225154248 -0.087159767391 1.300442672399 ]
Use this space Gamut compare ↗ Transfer compare ↗