mirror of https://github.com/mpv-player/mpv
vo_opengl: fix sharpen filter
Regression since commit 93546f0c
.
Fixes #2956.
This commit is contained in:
parent
f8ec535131
commit
71642f5d23
|
@ -2112,7 +2112,8 @@ static void pass_render_frame(struct gl_video *p)
|
||||||
|
|
||||||
if (p->opts.unsharp != 0.0) {
|
if (p->opts.unsharp != 0.0) {
|
||||||
finish_pass_fbo(p, &p->unsharp_fbo, p->texture_w, p->texture_h, 0);
|
finish_pass_fbo(p, &p->unsharp_fbo, p->texture_w, p->texture_h, 0);
|
||||||
pass_sample_unsharp(p->sc, p->opts.unsharp);
|
int id = pass_read_fbo(p, &p->unsharp_fbo);
|
||||||
|
pass_sample_unsharp(p->sc, id, p->opts.unsharp);
|
||||||
}
|
}
|
||||||
|
|
||||||
pass_scale_main(p);
|
pass_scale_main(p);
|
||||||
|
|
|
@ -398,10 +398,10 @@ void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts,
|
||||||
GLSLF("}\n");
|
GLSLF("}\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void pass_sample_unsharp(struct gl_shader_cache *sc, float param)
|
void pass_sample_unsharp(struct gl_shader_cache *sc, int tex_num, float param)
|
||||||
{
|
{
|
||||||
GLSLF("// unsharp\n");
|
GLSLF("// unsharp\n");
|
||||||
sampler_prelude(sc, 0);
|
sampler_prelude(sc, tex_num);
|
||||||
|
|
||||||
GLSLF("{\n");
|
GLSLF("{\n");
|
||||||
GLSL(vec2 st1 = pt * 1.2;)
|
GLSL(vec2 st1 = pt * 1.2;)
|
||||||
|
|
|
@ -41,6 +41,6 @@ void pass_delinearize(struct gl_shader_cache *sc, enum mp_csp_trc trc);
|
||||||
void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts,
|
void pass_sample_deband(struct gl_shader_cache *sc, struct deband_opts *opts,
|
||||||
int tex_num, float tex_mul, GLenum tex_target, AVLFG *lfg);
|
int tex_num, float tex_mul, GLenum tex_target, AVLFG *lfg);
|
||||||
|
|
||||||
void pass_sample_unsharp(struct gl_shader_cache *sc, float param);
|
void pass_sample_unsharp(struct gl_shader_cache *sc, int tex_num, float param);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue