Update mpv config:
This commit is contained in:
parent
64e685695e
commit
d1e0b97d62
36 changed files with 5555 additions and 10 deletions
28
mpv/shaders/hdr-toys/transfer-function/bt1886_inv.glsl
Normal file
28
mpv/shaders/hdr-toys/transfer-function/bt1886_inv.glsl
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue