FilmLight E-Gamut 2 / T-Log
原色为 FilmLight 的 Enhanced Generic Display Primaries 2024,T-Log 是 Cineon 派生的对数曲线,设计用作工作色彩空间。
图 1:FilmLight E-Gamut 2 / T-Log — CIE 1931 xy。图 2:FilmLight E-Gamut 2 / T-Log 编码曲线,L = 0.18 × 2^stops。 | x | y |
|---|
| Red | 0.8300 | 0.3100 |
| Green | 0.1500 | 0.9500 |
| Blue | 0.0650 | -0.0805 |
| White (D65) | 0.3127 | 0.3290 |
传递函数
| 曲线 | FilmLight-T-log |
|---|
| 黑点 / 白点(10-bit 码值) | 0 / 1023 |
|---|
| 线性 0 → 编码 | 0.0750 |
|---|
| 18% 灰 → 编码 | 0.3966 |
|---|
| 线性 1.0 → 编码 | 0.5525 |
|---|
编码: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;
}解码: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 矩阵
RGB → XYZ
[ 0.736477700184 0.130739651087 0.083238575781 ]
[ 0.275069984406 0.828017790216 -0.103087774621 ]
[ -0.124225154248 -0.087159767391 1.300442672399 ]
用这个空间
色域比对 ↗
传递函数比对 ↗