diff --git a/sway/desktop/fx_renderer.c b/sway/desktop/fx_renderer.c index f2436e96..3b4279fe 100644 --- a/sway/desktop/fx_renderer.c +++ b/sway/desktop/fx_renderer.c @@ -18,13 +18,12 @@ #include "sway/server.h" // shaders -#include "quad_vert_src.h" +#include "common_vert_src.h" #include "quad_frag_src.h" #include "quad_round_frag_src.h" #include "quad_round_tl_frag_src.h" #include "quad_round_tr_frag_src.h" #include "corner_frag_src.h" -#include "tex_vert_src.h" #include "tex_rgba_frag_src.h" #include "tex_rgbx_frag_src.h" #include "tex_external_frag_src.h" @@ -188,7 +187,7 @@ struct fx_renderer *fx_renderer_create(struct wlr_egl *egl) { GLuint prog; // quad fragment shader - prog = link_program(quad_vert_src, quad_frag_src); + prog = link_program(common_vert_src, quad_frag_src); renderer->shaders.quad.program = prog; if (!renderer->shaders.quad.program) { goto error; @@ -198,21 +197,21 @@ struct fx_renderer *fx_renderer_create(struct wlr_egl *egl) { renderer->shaders.quad.pos_attrib = glGetAttribLocation(prog, "pos"); // rounded quad fragment shaders - prog = link_program(quad_vert_src, quad_round_frag_src); + prog = link_program(common_vert_src, quad_round_frag_src); if (!init_rounded_quad_shader(&renderer->shaders.rounded_quad, prog)) { goto error; } - prog = link_program(quad_vert_src, quad_round_tl_frag_src); + prog = link_program(common_vert_src, quad_round_tl_frag_src); if (!init_rounded_quad_shader(&renderer->shaders.rounded_tl_quad, prog)) { goto error; } - prog = link_program(quad_vert_src, quad_round_tr_frag_src); + prog = link_program(common_vert_src, quad_round_tr_frag_src); if (!init_rounded_quad_shader(&renderer->shaders.rounded_tr_quad, prog)) { goto error; } // Border corner shader - prog = link_program(quad_vert_src, corner_frag_src); + prog = link_program(common_vert_src, corner_frag_src); renderer->shaders.corner.program = prog; if (!renderer->shaders.corner.program) { goto error; @@ -230,15 +229,15 @@ struct fx_renderer *fx_renderer_create(struct wlr_egl *egl) { renderer->shaders.corner.half_thickness = glGetUniformLocation(prog, "half_thickness"); // fragment shaders - prog = link_program(tex_vert_src, tex_rgba_frag_src); + prog = link_program(common_vert_src, tex_rgba_frag_src); if (!init_frag_shader(&renderer->shaders.tex_rgba, prog)) { goto error; } - prog = link_program(tex_vert_src, tex_rgbx_frag_src); + prog = link_program(common_vert_src, tex_rgbx_frag_src); if (!init_frag_shader(&renderer->shaders.tex_rgbx, prog)) { goto error; } - prog = link_program(tex_vert_src, tex_external_frag_src); + prog = link_program(common_vert_src, tex_external_frag_src); if (!init_frag_shader(&renderer->shaders.tex_ext, prog)) { goto error; } diff --git a/sway/desktop/shaders/quad.vert b/sway/desktop/shaders/common.vert similarity index 100% rename from sway/desktop/shaders/quad.vert rename to sway/desktop/shaders/common.vert diff --git a/sway/desktop/shaders/meson.build b/sway/desktop/shaders/meson.build index 069bb73f..08efb967 100644 --- a/sway/desktop/shaders/meson.build +++ b/sway/desktop/shaders/meson.build @@ -1,13 +1,12 @@ embed = find_program('./embed.sh', native: true) shaders = [ - 'quad.vert', + 'common.vert', 'quad.frag', 'quad_round.frag', 'quad_round_tl.frag', 'quad_round_tr.frag', 'corner.frag', - 'tex.vert', 'tex_rgba.frag', 'tex_rgbx.frag', 'tex_external.frag', diff --git a/sway/desktop/shaders/tex.vert b/sway/desktop/shaders/tex.vert deleted file mode 100644 index 3026521b..00000000 --- a/sway/desktop/shaders/tex.vert +++ /dev/null @@ -1,9 +0,0 @@ -uniform mat3 proj; -attribute vec2 pos; -attribute vec2 texcoord; -varying vec2 v_texcoord; - -void main() { - gl_Position = vec4(proj * vec3(pos, 1.0), 1.0); - v_texcoord = texcoord; -}