FilmLight E-Gamut / T-Log
原色为 FilmLight 的 Enhanced Generic Display Primaries,T-Log 是 Cineon 派生的对数曲线,设计用作工作色彩空间。
图 1:FilmLight E-Gamut / T-Log — CIE 1931 xy。图 2:FilmLight E-Gamut / T-Log 编码曲线,L = 0.18 × 2^stops。 | x | y |
|---|
| Red | 0.8000 | 0.3177 |
| Green | 0.1800 | 0.9000 |
| 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.705396850088 0.164041328310 0.081017748654 ]
[ 0.280130724091 0.820206641550 -0.100337365641 ]
[ -0.103781511569 -0.072907257027 1.265746519356 ]
用这个空间
色域比对 ↗
传递函数比对 ↗