summaryrefslogtreecommitdiff
path: root/sway/desktop/fx_renderer.c
diff options
context:
space:
mode:
authorWill McKinnon <[email protected]>2022-10-26 02:48:49 -0400
committerWill McKinnon <[email protected]>2022-10-26 02:48:49 -0400
commiteddbde479c9c93b8707d01dffb2e6a41fc451f29 (patch)
treea9b33cce73e4e5fc568f5b50cab6a22dcf5b8437 /sway/desktop/fx_renderer.c
parented130cdacce66ed2ae4f9e44bb4ae894beefceca (diff)
style: cleaned up some frag shaders
Diffstat (limited to 'sway/desktop/fx_renderer.c')
-rw-r--r--sway/desktop/fx_renderer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sway/desktop/fx_renderer.c b/sway/desktop/fx_renderer.c
index 6810fa26..90ed8957 100644
--- a/sway/desktop/fx_renderer.c
+++ b/sway/desktop/fx_renderer.c
@@ -86,8 +86,7 @@ bool init_frag_shader(struct gles2_tex_shader *shader, GLuint prog) {
shader->alpha = glGetUniformLocation(prog, "alpha");
shader->pos_attrib = glGetAttribLocation(prog, "pos");
shader->tex_attrib = glGetAttribLocation(prog, "texcoord");
- shader->width = glGetUniformLocation(prog, "width");
- shader->height = glGetUniformLocation(prog, "height");
+ shader->size = glGetUniformLocation(prog, "size");
shader->position = glGetUniformLocation(prog, "position");
shader->radius = glGetUniformLocation(prog, "radius");
return true;
@@ -277,8 +276,7 @@ bool fx_render_subtexture_with_matrix(struct fx_renderer *renderer, struct wlr_t
glUniform1f(shader->alpha, alpha);
// rounded corners
- glUniform1f(shader->width, dst_box->width);
- glUniform1f(shader->height, dst_box->height);
+ glUniform2f(shader->size, dst_box->width, dst_box->height);
glUniform2f(shader->position, dst_box->x, dst_box->y);
glUniform1f(shader->radius, radius);