Update mpv config:
This commit is contained in:
parent
64e685695e
commit
d1e0b97d62
36 changed files with 5555 additions and 10 deletions
31
mpv/shaders/hdr-toys/transfer-function/srgb_inv.glsl
Normal file
31
mpv/shaders/hdr-toys/transfer-function/srgb_inv.glsl
Normal file
|
@ -0,0 +1,31 @@
|
|||
// https://github.com/ampas/aces-core/blob/dev/lib/Lib.Academy.DisplayEncoding.ctl
|
||||
// moncurve with gamma of 2.4 and offset of 0.055 matches the EOTF found in IEC 61966-2-1:1999 (sRGB)
|
||||
|
||||
//!HOOK OUTPUT
|
||||
//!BIND HOOKED
|
||||
//!DESC transfer function (srgb, inverse)
|
||||
|
||||
const float gamma = 2.4;
|
||||
const float offset = 0.055;
|
||||
|
||||
float monitor_curve_eotf(float x) {
|
||||
const float fs = ((gamma - 1.0) / offset) * pow(offset * gamma / ((gamma - 1.0) * (1.0 + offset)), gamma);
|
||||
const float xb = offset / (gamma - 1.0);
|
||||
return x >= xb ? pow((x + offset) / (1.0 + offset), gamma) : x * fs;
|
||||
}
|
||||
|
||||
vec3 monitor_curve_eotf(vec3 color) {
|
||||
return vec3(
|
||||
monitor_curve_eotf(color.r),
|
||||
monitor_curve_eotf(color.g),
|
||||
monitor_curve_eotf(color.b)
|
||||
);
|
||||
}
|
||||
|
||||
vec4 hook() {
|
||||
vec4 color = HOOKED_tex(HOOKED_pos);
|
||||
|
||||
color.rgb = monitor_curve_eotf(color.rgb);
|
||||
|
||||
return color;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue