Update mpv config:
This commit is contained in:
parent
64e685695e
commit
d1e0b97d62
36 changed files with 5555 additions and 10 deletions
38
mpv/shaders/hdr-toys/utils/range.glsl
Normal file
38
mpv/shaders/hdr-toys/utils/range.glsl
Normal file
|
@ -0,0 +1,38 @@
|
|||
// from "full" to "limited" signal range
|
||||
|
||||
//!PARAM black
|
||||
//!TYPE float
|
||||
0.0625
|
||||
|
||||
//!PARAM white
|
||||
//!TYPE float
|
||||
0.91796875
|
||||
|
||||
//!PARAM depth
|
||||
//!TYPE float
|
||||
10.0
|
||||
|
||||
//!HOOK OUTPUT
|
||||
//!BIND HOOKED
|
||||
//!DESC signal range scaling
|
||||
|
||||
float range(float x, float w, float b) {
|
||||
return x * (w - b) + b;
|
||||
}
|
||||
|
||||
vec3 range(vec3 x, float w, float b) {
|
||||
return x * (w - b) + b;
|
||||
}
|
||||
|
||||
vec4 hook() {
|
||||
vec4 color = HOOKED_tex(HOOKED_pos);
|
||||
|
||||
float l = exp2(depth);
|
||||
float d = l - 1.0;
|
||||
float b = l * black / d;
|
||||
float w = l * white / d;
|
||||
|
||||
color.rgb = range(color.rgb, w, b);
|
||||
|
||||
return color;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue