mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
03ab560fae
Use appropriate names, and annotate the names with the types — 'u' for uniforms, 'a' for attributes. The common preambles for shaders are split from the bodies, so we need some way to distinguish the uniforms and the attributes just from their name.
16 lines
290 B
GLSL
16 lines
290 B
GLSL
uniform mat4 uMVP;
|
|
uniform sampler2D uSource;
|
|
uniform sampler2D uMask;
|
|
uniform float uAlpha;
|
|
uniform int uBlendMode;
|
|
|
|
varying vec2 vUv;
|
|
|
|
vec4 Texture(sampler2D sampler, vec2 texCoords) {
|
|
return texture2D(sampler, texCoords);
|
|
}
|
|
|
|
void setOutputColor(vec4 color) {
|
|
gl_FragColor = color;
|
|
}
|