mirror of
https://github.com/mpv-player/mpv
synced 2025-04-10 19:51:43 +00:00
vo_opengl: set uniform variable "pixel_size"
pixel_size is often used variable, also reciprocal is a costly operation for AMD and older nVidia (prior to Kepler) GPUs.
This commit is contained in:
parent
935c8402bc
commit
f0794d0544
@ -986,6 +986,8 @@ static void load_shader(struct gl_video *p, const char *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, "pixel_size", (GLfloat[]){1.0f / p->texture_w,
|
||||
1.0f / p->texture_h});
|
||||
}
|
||||
|
||||
static const char *get_custom_shader_fn(struct gl_video *p, const char *body)
|
||||
|
Loading…
Reference in New Issue
Block a user