diff options
author | Muhammad Faiz <mfcc64@gmail.com> | 2016-06-24 00:49:10 +0700 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-06-28 19:52:55 +0200 |
commit | d5615102d5bce7c506279a2578a34da25f91301f (patch) | |
tree | 1c04124e5c7637a0d41ecc5e4f546818b81b7dc9 /video | |
parent | 40c9b380232acdb159952bd8926851bb50ef78ea (diff) | |
download | mpv-d5615102d5bce7c506279a2578a34da25f91301f.tar.bz2 mpv-d5615102d5bce7c506279a2578a34da25f91301f.tar.xz |
vo_opengl: add output_size uniform to custom shader
logically, scaler should know its input and output size
Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/video.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index a704a261df..592dfa6e56 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1239,6 +1239,9 @@ static void load_shader(struct gl_video *p, struct bstr body) gl_sc_uniform_f(p->sc, "frame", p->frames_uploaded); gl_sc_uniform_vec2(p->sc, "image_size", (GLfloat[]){p->image_params.w, p->image_params.h}); + gl_sc_uniform_vec2(p->sc, "target_size", + (GLfloat[]){p->dst_rect.x1 - p->dst_rect.x0, + p->dst_rect.y1 - p->dst_rect.y0}); } static const char *get_custom_shader_fn(struct gl_video *p, const char *body) |