mirror of
https://github.com/mpv-player/mpv
synced 2025-02-16 20:27:23 +00:00
vo_opengl: fix scale=oversample's threshold calculations
This resulted in wrong behavior for values of scale-param1 between 0.0 and 0.5 (not inclusive).
This commit is contained in:
parent
281c21b7f1
commit
86a60a4dd2
@ -1314,7 +1314,7 @@ static void pass_sample_oversample(struct gl_video *p, struct scaler *scaler,
|
|||||||
GLSLF("coeff = mix(coeff, vec2(0.0), "
|
GLSLF("coeff = mix(coeff, vec2(0.0), "
|
||||||
"lessThanEqual(coeff, vec2(%f)));\n", threshold);
|
"lessThanEqual(coeff, vec2(%f)));\n", threshold);
|
||||||
GLSLF("coeff = mix(coeff, vec2(1.0), "
|
GLSLF("coeff = mix(coeff, vec2(1.0), "
|
||||||
"greaterThanEqual(coeff, vec2(%f)));\n", threshold);
|
"greaterThanEqual(coeff, vec2(%f)));\n", 1.0 - threshold);
|
||||||
}
|
}
|
||||||
// Compute the right blend of colors
|
// Compute the right blend of colors
|
||||||
GLSL(vec4 left = mix(texture(tex, baseSW),
|
GLSL(vec4 left = mix(texture(tex, baseSW),
|
||||||
|
Loading…
Reference in New Issue
Block a user