mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-06 13:29:45 -05:00
Merge branch 'master' into matrix-redesign
This commit is contained in:
commit
8b58e1a3ad
16 changed files with 809 additions and 8 deletions
|
|
@ -32,6 +32,7 @@ const GLchar quad_fragment_src[] =
|
|||
"precision mediump float;"
|
||||
"varying vec4 v_color;"
|
||||
"varying vec2 v_texcoord;"
|
||||
""
|
||||
"void main() {"
|
||||
" gl_FragColor = v_color;"
|
||||
"}";
|
||||
|
|
@ -41,6 +42,7 @@ const GLchar ellipse_fragment_src[] =
|
|||
"precision mediump float;"
|
||||
"varying vec4 v_color;"
|
||||
"varying vec2 v_texcoord;"
|
||||
""
|
||||
"void main() {"
|
||||
" float l = length(v_texcoord - vec2(0.5, 0.5));"
|
||||
" if (l > 0.5) discard;"
|
||||
|
|
@ -50,6 +52,7 @@ const GLchar ellipse_fragment_src[] =
|
|||
// Textured quads
|
||||
const GLchar vertex_src[] =
|
||||
"uniform mat3 proj;"
|
||||
"uniform bool invert_y;"
|
||||
"attribute vec2 pos;"
|
||||
"attribute vec2 texcoord;"
|
||||
"varying vec2 v_texcoord;"
|
||||
|
|
@ -67,8 +70,12 @@ const GLchar vertex_src[] =
|
|||
"}"
|
||||
""
|
||||
"void main() {"
|
||||
" gl_Position = vec4(transpose(proj) * vec3(pos, 1.0), 1.0);"
|
||||
" v_texcoord = texcoord;"
|
||||
" gl_Position = vec4(transpose(proj) * vec3(pos, 1.0), 1.0);"
|
||||
" if (invert_y) {"
|
||||
" v_texcoord = vec2(texcoord.s, 1.0 - texcoord.t);"
|
||||
" } else {"
|
||||
" v_texcoord = texcoord;"
|
||||
" }"
|
||||
"}";
|
||||
|
||||
const GLchar fragment_src_rgba[] =
|
||||
|
|
@ -76,6 +83,7 @@ const GLchar fragment_src_rgba[] =
|
|||
"varying vec2 v_texcoord;"
|
||||
"uniform sampler2D tex;"
|
||||
"uniform float alpha;"
|
||||
""
|
||||
"void main() {"
|
||||
" gl_FragColor = alpha * texture2D(tex, v_texcoord);"
|
||||
"}";
|
||||
|
|
@ -85,6 +93,7 @@ const GLchar fragment_src_rgbx[] =
|
|||
"varying vec2 v_texcoord;"
|
||||
"uniform sampler2D tex;"
|
||||
"uniform float alpha;"
|
||||
""
|
||||
"void main() {"
|
||||
" gl_FragColor.rgb = alpha * texture2D(tex, v_texcoord).rgb;"
|
||||
" gl_FragColor.a = alpha;"
|
||||
|
|
@ -95,6 +104,7 @@ const GLchar fragment_src_external[] =
|
|||
"precision mediump float;"
|
||||
"varying vec2 v_texcoord;"
|
||||
"uniform samplerExternalOES texture0;"
|
||||
""
|
||||
"void main() {"
|
||||
" vec4 col = texture2D(texture0, v_texcoord);"
|
||||
" gl_FragColor = vec4(col.rgb, col.a);"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue