Update mpv config:

This commit is contained in:
aria 2025-05-26 00:03:04 +10:00
parent 64e685695e
commit d1e0b97d62
Signed by: aria
SSH key fingerprint: SHA256:WqtcVnDMrv1lnUlNah5k31iywFUI/DV+5yHzCTO4Vds
36 changed files with 5555 additions and 10 deletions

View file

@ -0,0 +1,28 @@
// https://www.itu.int/rec/R-REC-BT.1886
//!HOOK OUTPUT
//!BIND HOOKED
//!DESC transfer function (bt.1886, inverse)
float bt1886_eotf(float V, float gamma, float Lw, float Lb) {
float a = pow(pow(Lw, 1.0 / gamma) - pow(Lb, 1.0 / gamma), gamma);
float b = pow(Lb, 1.0 / gamma) / (pow(Lw, 1.0 / gamma) - pow(Lb, 1.0 / gamma));
float L = a * pow(max(V + b, 0.0), gamma);
return L;
}
vec3 bt1886_eotf(vec3 color, float gamma, float Lw, float Lb) {
return vec3(
bt1886_eotf(color.r, gamma, Lw, Lb),
bt1886_eotf(color.g, gamma, Lw, Lb),
bt1886_eotf(color.b, gamma, Lw, Lb)
);
}
vec4 hook() {
vec4 color = HOOKED_tex(HOOKED_pos);
color.rgb = bt1886_eotf(color.rgb, 2.4, 1.0, 0.001);
return color;
}