mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
cc909b160f
Use a unified approach to write both vertex and fragment shader in the same file.
14 lines
251 B
GLSL
14 lines
251 B
GLSL
// VERTEX_SHADER:
|
|
void main() {
|
|
gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
|
|
|
|
vUv = vec2(aUv.x, aUv.y);
|
|
}
|
|
|
|
// FRAGMENT_SHADER:
|
|
void main() {
|
|
vec4 diffuse = Texture(u_source, vUv);
|
|
|
|
setOutputColor(diffuse * u_alpha);
|
|
}
|